You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Derives on deprecated items generate deprecation warnings #58822
Hmm; technically generating warnings seems like correct but annoying behavior (which we don't have to fix but probably should...). Putting #[allow(deprecated)] on generated impls seems like a solution?
derive attributes can only be put on the type but the same people than the ones who control the deprecated attribute, so I don't see how that's technically correct. Derives should only ever generate a deprecated warning if the trait they derive is deprecated, never because of the type's deprecatedness.
Regression is tracked to c84e797, which is #58098, cc @oli-obk -- this PR is titled " Require a list of features in #[allow_internal_unstable]#58098 ", one can certainly imagine how it could be related to this problem, perhaps the list of "allowed unstable features" for derives simply needs to be extended?
This is definitely caused by this change. We used to just not emit deprecation warnings inside allow_internal_unstable code. I'll extend derives to add #[allow(deprecated)] to replicate the previous behaviour, but we should probably create something more fine grained some day.
Activity
Centril commentedon Feb 28, 2019
Hmm; technically generating warnings seems like correct but annoying behavior (which we don't have to fix but probably should...). Putting
#[allow(deprecated)]on generated impls seems like a solution?joshlf commentedon Mar 1, 2019
This regression also breaks existing code with
#[deny(warnings)].nox commentedon Mar 5, 2019
deriveattributes can only be put on the type but the same people than the ones who control thedeprecatedattribute, so I don't see how that's technically correct. Derives should only ever generate adeprecatedwarning if the trait they derive is deprecated, never because of the type's deprecatedness.asajeffrey commentedon Mar 5, 2019
Just hit this in servo...
Caused by deprecating a field in a struct.
joshlf commentedon Mar 6, 2019
Just hit this in Mundane too. We
#![deny(warnings)], so it causes compilation failure.pnkfelix commentedon Mar 7, 2019
triage: P-high
nikomatsakis commentedon Mar 7, 2019
I'm currently running a bisection with cargo-bisect-rustc.
nikomatsakis commentedon Mar 7, 2019
Regression is tracked to c84e797, which is #58098, cc @oli-obk -- this PR is titled " Require a list of features in
#[allow_internal_unstable]#58098 ", one can certainly imagine how it could be related to this problem, perhaps the list of "allowed unstable features" for derives simply needs to be extended?pnkfelix commentedon Mar 7, 2019
speculatively assigning to @oli-obk based on @nikomatsakis 's bisection.
oli-obk commentedon Mar 7, 2019
This is definitely caused by this change. We used to just not emit deprecation warnings inside
allow_internal_unstablecode. I'll extend derives to add#[allow(deprecated)]to replicate the previous behaviour, but we should probably create something more fine grained some day.