diff options
| author | Jacob Pratt <jacob@jhpratt.dev> | 2022-04-11 20:43:42 -0400 |
|---|---|---|
| committer | Jacob Pratt <jacob@jhpratt.dev> | 2022-04-14 21:19:48 -0400 |
| commit | 0b3db4e4ee0767a8996f20538da85ce5e1bb46b2 (patch) | |
| tree | 2646be1ea3904ec9b01e69186d218a0102f31a55 /compiler | |
| parent | bfdf234fae852113d73fbe894d2583857b10d8d2 (diff) | |
| download | rust-0b3db4e4ee0767a8996f20538da85ce5e1bb46b2.tar.gz rust-0b3db4e4ee0767a8996f20538da85ce5e1bb46b2.zip | |
Use native duplicate attribute check
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_attr/src/builtin.rs | 8 | ||||
| -rw-r--r-- | compiler/rustc_feature/src/builtin_attrs.rs | 7 |
2 files changed, 3 insertions, 12 deletions
diff --git a/compiler/rustc_attr/src/builtin.rs b/compiler/rustc_attr/src/builtin.rs index 466ab82031d..5a79cf68f11 100644 --- a/compiler/rustc_attr/src/builtin.rs +++ b/compiler/rustc_attr/src/builtin.rs @@ -679,14 +679,6 @@ where continue; } - if let Some((_, span)) = &depr { - struct_span_err!(diagnostic, attr.span, E0550, "multiple deprecated attributes") - .span_label(attr.span, "repeated deprecation attribute") - .span_label(*span, "first deprecation attribute") - .emit(); - break; - } - // FIXME(jhpratt) remove this eventually if attr.has_name(sym::rustc_deprecated) { diagnostic diff --git a/compiler/rustc_feature/src/builtin_attrs.rs b/compiler/rustc_feature/src/builtin_attrs.rs index e588385cfca..2d94a028ebe 100644 --- a/compiler/rustc_feature/src/builtin_attrs.rs +++ b/compiler/rustc_feature/src/builtin_attrs.rs @@ -304,8 +304,7 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[ List: r#"/*opt*/ since = "version", /*opt*/ note = "reason""#, NameValueStr: "reason" ), - // This has special duplicate handling in E0550 to handle duplicates with rustc_deprecated - DuplicatesOk + ErrorFollowing ), // Crate properties: @@ -463,10 +462,10 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[ // ========================================================================== ungated!(feature, CrateLevel, template!(List: "name1, name2, ..."), DuplicatesOk), - // DuplicatesOk since it has its own validation + // FIXME(jhpratt) remove this eventually ungated!( rustc_deprecated, Normal, - template!(List: r#"since = "version", note = "...""#), DuplicatesOk // See E0550 + template!(List: r#"since = "version", note = "...""#), ErrorFollowing ), // DuplicatesOk since it has its own validation ungated!( |
