about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-02-16 18:59:27 +0100
committerGitHub <noreply@github.com>2022-02-16 18:59:27 +0100
commit6930b6676ae20cfa26eaa78b5f9428c92f28235b (patch)
tree3a29d0334aaa1c29f0170f13dd802791ffba57ac
parentf90b06d7fb00470177516c5881bcec0432cb4f24 (diff)
parent969fee6cbe2f9d3dbcf9f0b58785d1ed9b759c20 (diff)
downloadrust-6930b6676ae20cfa26eaa78b5f9428c92f28235b.tar.gz
rust-6930b6676ae20cfa26eaa78b5f9428c92f28235b.zip
Rollup merge of #92366 - jhpratt:derive-default-enum, r=Mark-Simulacrum
Resolve concern of `derive_default_enum`

This resolves the concern in favor of prohibiting multiple instances of
the attribute. This is similar to non-helper attributes as introduced in
#88681.

``@rustbot`` label +S-waiting-on-review +T-libs-api
-rw-r--r--compiler/rustc_builtin_macros/src/deriving/default.rs3
1 files changed, 0 insertions, 3 deletions
diff --git a/compiler/rustc_builtin_macros/src/deriving/default.rs b/compiler/rustc_builtin_macros/src/deriving/default.rs
index 8c53094b624..1d1eee88a68 100644
--- a/compiler/rustc_builtin_macros/src/deriving/default.rs
+++ b/compiler/rustc_builtin_macros/src/deriving/default.rs
@@ -222,9 +222,6 @@ fn validate_default_attribute(
             "this method must only be called with a variant that has a `#[default]` attribute",
         ),
         [first, rest @ ..] => {
-            // FIXME(jhpratt) Do we want to perform this check? It doesn't exist
-            // for `#[inline]`, `#[non_exhaustive]`, and presumably others.
-
             let suggestion_text =
                 if rest.len() == 1 { "try removing this" } else { "try removing these" };