You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of #115690 - ShE3py:Z-treat-err-as-bug, r=petrochenkov
Allow `-Z treat-err-as-bug=0`
Makes `-Z treat-err-as-bug=0` behave as if the option wasn't present instead of asking the value to be ⩾ 1. This enables a quick on/off of the option, as you only need to change one character instead of removing the whole `-Z`.
Also update some text, e.g.
```bash
$ rustc -Z help | grep treat-err-as-bug
-Z treat-err-as-bug=val -- treat error number `val` that occurs as bug
```
where the value could be interpreted as an error code instead of an ordinal.
Copy file name to clipboardExpand all lines: compiler/rustc_session/src/options.rs
+14-7
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ use std::collections::BTreeMap;
20
20
21
21
use std::collections::hash_map::DefaultHasher;
22
22
use std::hash::Hasher;
23
-
use std::num::NonZeroUsize;
23
+
use std::num::{IntErrorKind,NonZeroUsize};
24
24
use std::path::PathBuf;
25
25
use std::str;
26
26
@@ -387,7 +387,7 @@ mod desc {
387
387
"`all` (default), `except-unused-generics`, `except-unused-functions`, or `off`";
388
388
pubconst parse_instrument_xray:&str = "either a boolean (`yes`, `no`, `on`, `off`, etc), or a comma separated list of settings: `always` or `never` (mutually exclusive), `ignore-loops`, `instruction-threshold=N`, `skip-entry`, `skip-exit`";
389
389
pubconst parse_unpretty:&str = "`string` or `string=string`";
390
-
pubconst parse_treat_err_as_bug:&str = "either no value or a number bigger than 0";
390
+
pubconst parse_treat_err_as_bug:&str = "either no value or a non-negative number";
391
391
pubconst parse_trait_solver:&str =
392
392
"one of the supported solver modes (`classic`, `next`, or `next-coherence`)";
0 commit comments