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
Regression in 1.26 with misplaced attributes #49934
All the regressed crates have a misplaced #[derive] in the codebase (such as a #[derive(Debug)] above a variable declaration). In Rust 1.25 the compiler accepts the code, but in Rust 1.26 it throws an error and then crashes.
I have a feeling I know where it's broken in one of my macros for chiisai based off the build log. I slapped an #[inline(always)] above a closure that gets passed to it in that macro. I'll need to confirm though. It's a non proc_macro just the regular macro_rules!
This compiles with stable.
That pull request I made was in nightly on 2018-04-01, and that only has an error for the incorrect repr above _x
With nightly from 2018-04-10 The compiler crashed after showing an error about the incorrect derive.
Ironically I'm able to work on beta and not nightly.
However, compile-fail seems to eat the ICE because while I can reproduce it on master, I have to manually call the built rustc to get it because the compile-fail suite passes because it still produces the expected error.
Activity
emilyalbini commentedon Apr 13, 2018
This also happens with misplaced attributes on functions:
[-]Regression in 1.26 with misplaced derives[/-][+]Regression in 1.26 with misplaced attributes[/+]Mark-Simulacrum commentedon Apr 13, 2018
cc @alexcrichton @dtolnay -- proc-macro related changes presumably
mgattozzi commentedon Apr 13, 2018
I have a feeling I know where it's broken in one of my macros for chiisai based off the build log. I slapped an #[inline(always)] above a closure that gets passed to it in that macro. I'll need to confirm though. It's a non proc_macro just the regular macro_rules!
Remove misplaced #[inline], popped up here: rust-lang/rust#49934
alexcrichton commentedon Apr 16, 2018
My guess is that this isn't related to procedural macros but rather #49291, cc @tejom and @petrochenkov
tejom commentedon Apr 16, 2018
The change that effected inline and closures was brought up in issue #49632
I don't mind making a change to make the original pull request a warning if that is preferred?
tejom commentedon Apr 16, 2018
The ice with the derive check doesn't seem to be caused by #49291
This compiles with stable.
That pull request I made was in nightly on 2018-04-01, and that only has an error for the incorrect repr above
_xWith nightly from 2018-04-10 The compiler crashed after showing an error about the incorrect derive.
emilyalbini commentedon Apr 17, 2018
Did a bisect run, and #49124 is the source of the ICE. cc @petrochenkov @abonander
1 remaining item
abonander commentedon Apr 18, 2018
Ironically I'm able to work on beta and not nightly.
However, compile-fail seems to eat the ICE because while I can reproduce it on master, I have to manually call the built rustc to get it because the compile-fail suite passes because it still produces the expected error.
nikomatsakis commentedon Apr 26, 2018
triage: P-high
Has a pending fix.
Auto merge of #50092 - abonander:issue-49934, r=petrochenkov
Warn on pointless `#[derive]` in more places