-
Notifications
You must be signed in to change notification settings - Fork 13k
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
assert! allows invalid trailing tokens in expression #60024
Comments
1.26.0 is the first version that accepts this. 1.25.0 rejects it with:
|
(not really a regression since more code now compiles) |
Adding T-compiler since |
Opened #60039—it should fix the issue. |
triage: P-medium. I'm going to assume we don't need any future-compat machinery for a bug of this nature, unless the crater run on PR #60039 indicates that there are occurrences of this mis-use of |
There is a bug in rustc that allows adding invalid trailing tokens to the `assert!` macro call. They are currently ignored but are going to produce errors in the future. Fix assert! macro usage to remove extra tokens. For more information, see rust-lang/rust#60024 and rust-lang/rust#60039
There is a bug in rustc that allows adding invalid trailing tokens to the `assert!` macro call. They are currently ignored but are going to produce errors in the future. Fix assert! macro usage to remove extra tokens. For more information, see rust-lang/rust#60024 and rust-lang/rust#60039
There is a bug in rustc that allows adding invalid trailing tokens to the `assert!` macro call. They are currently ignored but are going to produce errors in the future. Fix assert! macro usage to add missing comma. For more information, see rust-lang/rust#60024 and rust-lang/rust#60039
There is a bug in rustc that allows adding invalid trailing tokens to the `assert!` macro call. They are currently ignored but are going to produce errors in the future. Fix assert! macro usage to remove extra tokens. For more information, see rust-lang/rust#60024 and rust-lang/rust#60039
There is a bug in rustc that allows adding invalid trailing tokens to the `assert!` macro call. They are currently ignored but are going to produce errors in the future. Fix assert! macro usage to add missing comma. For more information, see rust-lang/rust#60024 and rust-lang/rust#60039
There is a bug in rustc that allows adding invalid trailing tokens to the `assert!` macro call. They are currently ignored but are going to produce errors in the future. Fix assert! macro usage to remove extra tokens. For more information, see rust-lang/rust#60024 and rust-lang/rust#60039
There is a bug in rustc that allows adding invalid trailing tokens to the `assert!` macro call. They are currently ignored but are going to produce errors in the future. Fix assert! macro usage to remove extra tokens. For more information, see rust-lang/rust#60024 and rust-lang/rust#60039
There is a bug in rustc that allows adding invalid trailing tokens to the `assert!` macro call. They are currently ignored but are going to produce errors in the future. Fix assert! macro usage to add missing comma. For more information, see rust-lang/rust#60024 and rust-lang/rust#60039
There is a bug in rustc that allows adding invalid trailing tokens to the `assert!` macro call. They are currently ignored but are going to produce errors in the future. Fix assert! macro usage to add missing comma. For more information, see rust-lang/rust#60024 and rust-lang/rust#60039
Make assert! ensure the macro is parsed completely Fixes #60024
(Playground)
Output:
Version:
Expected:
Original report:
https://www.reddit.com/r/rust/comments/bdbtpr/hey_rustaceans_got_an_easy_question_ask_here/el1gm0h/
The text was updated successfully, but these errors were encountered: