Skip to content

Commit 09148db

Browse files
authoredFeb 16, 2022
Rollup merge of rust-lang#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 rust-lang#88681. `@rustbot` label +S-waiting-on-review +T-libs-api
2 parents a240ccd + 969fee6 commit 09148db

File tree

1 file changed

+0
-3
lines changed
  • compiler/rustc_builtin_macros/src/deriving

1 file changed

+0
-3
lines changed
 

‎compiler/rustc_builtin_macros/src/deriving/default.rs

-3
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,6 @@ fn validate_default_attribute(
222222
"this method must only be called with a variant that has a `#[default]` attribute",
223223
),
224224
[first, rest @ ..] => {
225-
// FIXME(jhpratt) Do we want to perform this check? It doesn't exist
226-
// for `#[inline]`, `#[non_exhaustive]`, and presumably others.
227-
228225
let suggestion_text =
229226
if rest.len() == 1 { "try removing this" } else { "try removing these" };
230227

0 commit comments

Comments
 (0)
Please sign in to comment.