-
Couldn't load subscription status.
- Fork 13.9k
Fix double handling in collect_tokens
#129346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
deab741
312ecdb
1ae521e
0bae33f
39b38a9
b7e7f6e
1fdabfb
d4bf28c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| // This was triggering an assertion failure in `NodeRange::new`. | ||
|
|
||
| #![feature(cfg_eval)] | ||
| #![feature(stmt_expr_attributes)] | ||
|
|
||
| fn f() -> u32 { | ||
| #[cfg_eval] #[cfg(not(FALSE))] 0 | ||
| //~^ ERROR removing an expression is not supported in this position | ||
| } | ||
|
|
||
| fn main() {} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| error: removing an expression is not supported in this position | ||
| --> $DIR/invalid-node-range-issue-129166.rs:7:17 | ||
| | | ||
| LL | #[cfg_eval] #[cfg(not(FALSE))] 0 | ||
| | ^^^^^^^^^^^^^^^^^^ | ||
|
|
||
| error: aborting due to 1 previous error | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,17 +14,15 @@ extern crate test_macros; | |
| macro_rules! produce_it { | ||
| ($expr:expr) => { | ||
| #[derive(Print)] | ||
| struct Foo { | ||
| val: [bool; { | ||
| let a = #[cfg_attr(not(FALSE), rustc_dummy(first))] $expr; | ||
| 0 | ||
| }] | ||
| } | ||
|
Comment on lines
-17
to
-22
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This case stopped working? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in #132587. |
||
| struct Foo( | ||
| [bool; #[cfg_attr(not(FALSE), rustc_dummy(first))] $expr] | ||
| ); | ||
| } | ||
| } | ||
|
|
||
| produce_it!(#[cfg_attr(not(FALSE), rustc_dummy(second))] { | ||
| #![cfg_attr(not(FALSE), allow(unused))] | ||
| #![cfg_attr(not(FALSE), rustc_dummy(third))] | ||
| #[cfg_attr(not(FALSE), rustc_dummy(fourth))] | ||
| 30 | ||
| }); | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.