Uh oh!
There was an error while loading. Please reload this page.
Feature-gate #[derive_*] even when produced by macro expansion. - #32671
Feature-gate #[derive_*] even when produced by macro expansion.#32671eddyb wants to merge 1 commit into
Conversation
rust-highfive
commented
Apr 1, 2016
(rust_highfive has picked a reviewer for you, use r? to override) |
| // FIXME(eddyb) #[allow_internal_unstable] | ||
| // doesn't actually work for some reason. | ||
| #[derive(Clone)] //#[derive_Clone] |
There was a problem hiding this comment.
Wouldn't you need to also turn on the feature gate for #[derive_X] syntax? Is there even such a gate? namely #![feature(custom_derive)]
There was a problem hiding this comment.
There is, custom_derive, but allow_internal_unstable is supposed to bypass the actual feature gating (i.e. any feature can be used inside an #[allow_internal_unstable] macro).
This works with, e.g. #[thread_local] static FOO: usize = 0;, but not #[derive_Clone].
There was a problem hiding this comment.
Ah, nevermind then, I thought it looked at the actual features enabled in the macro-declaring crate.
alexcrichton
commented
Apr 3, 2016
nikomatsakis
commented
Apr 6, 2016
bors
commented
Apr 28, 2016
☔ The latest upstream changes (presumably #32791) made this pull request unmergeable. Please resolve the merge conflicts. |
Fixes#32655 by marking
#[derive_Trait]attributes produced by the compiler from theuser-friendly
#[derive(Trait)]syntax to allow unstable features, and gating on that.