diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-12-22 02:40:04 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-12-22 02:40:04 +0100 |
| commit | eaeb1138c6e4956a416e161ffc03eaf7db832101 (patch) | |
| tree | 38ba6a99e4e17147adca35c2543c1adf065a0ead /src/libsyntax | |
| parent | 877dc9daa8eebee7a6e4dc5fc7df6770a086df59 (diff) | |
| parent | 62714f8b170dadc381fd9883031d42ba2ee8ece9 (diff) | |
| download | rust-eaeb1138c6e4956a416e161ffc03eaf7db832101.tar.gz rust-eaeb1138c6e4956a416e161ffc03eaf7db832101.zip | |
Rollup merge of #67480 - rossmacarthur:fix-41260-avoid-issue-0-part-2, r=Centril
Require issue = "none" over issue = "0" in unstable attributes These changes make the use of `issue = "none"` required in unstable attributes throughout the compiler. Notes: - #66299 is now in beta so `issue = "none"` is accepted. - The `tidy` tool now fails on `issue = "0"`. - Tests that used `issue = "0"` were changed to use `issue = "none"`, except for _one_ that asserts `issue = "0"` can still be used. - The compiler still allows `issue = "0"` because some submodules require it, this could be disallowed once these are updated. Resolves #41260 r? @varkor
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/attr/builtin.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/attr/builtin.rs b/src/libsyntax/attr/builtin.rs index a37b27f67bc..d780d0ad764 100644 --- a/src/libsyntax/attr/builtin.rs +++ b/src/libsyntax/attr/builtin.rs @@ -376,11 +376,11 @@ fn find_stability_generic<'a, I>(sess: &ParseSess, match (feature, reason, issue) { (Some(feature), reason, Some(issue)) => { let issue = match &*issue.as_str() { - // FIXME(rossmacarthur): remove "0" because "none" should be used - // See #41260 - "none" | "0" => None, + "none" => None, issue => { if let Ok(num) = issue.parse() { + // FIXME(rossmacarthur): disallow 0 + // Disallowing this requires updates to some submodules NonZeroU32::new(num) } else { span_err!( |
