Skip to content

Commit

Permalink
Rollup merge of rust-lang#92366 - jhpratt:derive-default-enum, r=Mark…
Browse files Browse the repository at this point in the history
…-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
  • Loading branch information
matthiaskrgr committed Feb 16, 2022
2 parents f90b06d + 969fee6 commit 6930b66
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions compiler/rustc_builtin_macros/src/deriving/default.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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" };

Expand Down

0 comments on commit 6930b66

Please sign in to comment.