Repository navigation
Bogus unknown attribute errors in newest nightly #53481
Description
Activity
- addedA-resolveArea: Name/path resolution done by `rustc_resolve` specificallyArea: Name/path resolution done by `rustc_resolve` specificallyA-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
on Aug 19, 2018 Unfortunately, feature gate errors are fatal (this needs to be fixed), so in this case they hide the true issue:
error: cannot determine resolution for the derive macro `Deserialize` --> src/append/file.rs:24:10 | 24 | #[derive(Deserialize)] | ^^^^^^^^^^^ | = note: import resolution is stuck, try simplifying macro importsAll in all, this happens due to
#[derive(Deserialize)]being in the same scope withuse file::Deserialize;, but I'm not yet sure about details.
I'll try to minimize the issue and find out why resolution is stuck.The workaround is to avoid
use file::Deserialize;imports and to use::file::Deserializeexplicitly.Minimized:
#[macro_use] extern crate serde_derive; mod m1 { use m2::Deserialize; #[derive(Deserialize)] //~ ERROR cannot determine resolution for the derive macro `Deserialize` struct A {} } mod m2 { pub type Deserialize = u8; #[derive(Deserialize)] #[serde] struct B {} }
I believe my project is hitting a similar issue: see the travis CI runs for this PR: graphql-rust/graphql-client#79
error: cannot determine resolution for the attribute macro `serde` --> tests/subscriptions.rs:19:10 | 19 | #[derive(GraphQLQuery)] | ^^^^^^^^^^^^ | = note: import resolution is stuck, try simplifying macro imports(happens only on nightly)
Fixed in #53587
Reacted by Tom Houlé- addedT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
on Aug 30, 2018 visiting for triage. P-high. (Hopefully the aforementioned PR will land before next week's meeting.)
For those looking for a nightly to use, nightly-2018-08-17 is the newest that does not hit this issue.
rustup install nightly-2018-08-17Reacted by memoryruins- added a commit that references this issue
on Sep 4, 2018 Fixed in #54086
- added a commit that references this issue
on Sep 13, 2018
log4rs no longer builds on nightly with bogus unknown attribute errors:
Those attributes are used on types with
#[derive(Deserialize)]so the serde attribute should be whitelisted: https://github.com/sfackler/log4rs/blob/master/src/append/file.rs#L22-L30estk/log4rs#75