Repository navigation
Regression in 1.26 with misplaced attributes #49934
Description
Activity
- addedI-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-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.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.C-bugCategory: This is a bug.Category: This is a bug.
on Apr 13, 2018 This also happens with misplaced attributes on functions:
- chiisai regressed from stable to beta (build log) cc @mgattozzi
- foundation regressed from stable to beta (build log) cc @mgattozzi
- libimagentrylink regressed from stable to beta (build log) cc @matthiasbeyer
- seq_io regressed from stable to beta (build log) cc @markschl
- indeyets/rust-nquads regressed from stable to beta (build log) cc @indeyets
- changed the title
[-]Regression in 1.26 with misplaced derives[/-][+]Regression in 1.26 with misplaced attributes[/+]on Apr 13, 2018 cc @alexcrichton @dtolnay -- proc-macro related changes presumably
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!
My guess is that this isn't related to procedural macros but rather #49291, cc @tejom and @petrochenkov
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?
The ice with the derive check doesn't seem to be caused by #49291
fn main() { #[derive(Debug)] let _a = 5; #[repr(always)] let _x = 12; }
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.Did a bisect run, and #49124 is the source of the ICE. cc @petrochenkov @abonander
1 remaining item
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.
triage: P-high
Has a pending fix.
- added a commit that references this issue
on Apr 30, 2018 - added a commit that references this issue
on Apr 30, 2018
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.Even if we keep the error (which could be turned into a warn-by-default lint) the ICE should be fixed.