Skip to content

Commit 8818eac

Browse files
committed
Add a comment to parse_bool.
It's behaviour can be surprising.
1 parent c55c682 commit 8818eac

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/librustc_session/options.rs

+3
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,9 @@ macro_rules! options {
299299
}
300300
)*
301301

302+
/// Set a flag to true. Note that it cannot set the flag to false, so
303+
/// using this parser in combination with a flag that defaults to true
304+
/// is useless; the flag will always be true.
302305
fn parse_bool(slot: &mut bool, v: Option<&str>) -> bool {
303306
match v {
304307
Some(..) => false,

0 commit comments

Comments
 (0)