-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Non-literal arguments to unreachable!()
are rejected starting with v1.59.0
#94475
Labels
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
Shnatsel
added
C-bug
Category: This is a bug.
regression-untriaged
Untriaged performance or correctness regression.
labels
Mar 1, 2022
rustbot
added
regression-from-stable-to-stable
Performance or correctness regression from one stable version to another.
I-prioritize
Issue: Indicates that prioritization has been requested for this issue.
and removed
regression-untriaged
Untriaged performance or correctness regression.
labels
Mar 1, 2022
Shnatsel
added a commit
to rustsec/rustsec
that referenced
this issue
Mar 1, 2022
This appears to have been an intentional bugfix to bring |
zslayton
added a commit
to amazon-ion/ion-cli
that referenced
this issue
Mar 2, 2022
Starting in Rust 1.59, calls to the `unreachable!` macro no longer accept string variables as their first parameter. This brings their behavior in line with macros like `println!`, `format!`, and `write!`. See: rust-lang/rust#94475
zslayton
added a commit
to amazon-ion/ion-cli
that referenced
this issue
Mar 2, 2022
Starting in Rust 1.59, calls to the `unreachable!` macro no longer accept string variables as their first parameter. This brings their behavior in line with macros like `println!`, `format!`, and `write!`. See: rust-lang/rust#94475
Why was there no future-incompat warning for this? The first time I saw it was when a stable compiler upgrade broke my code. |
apiraino
added
the
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
label
Mar 3, 2022
Closing this issue as intended behavior. |
camelid
removed
regression-from-stable-to-stable
Performance or correctness regression from one stable version to another.
I-prioritize
Issue: Indicates that prioritization has been requested for this issue.
labels
Mar 3, 2022
tarcieri
pushed a commit
to rustsec/rustsec
that referenced
this issue
Apr 16, 2022
boustrophedon
added a commit
to boustrophedon/rss-actions
that referenced
this issue
Oct 13, 2022
- use format string directly in unreachable! call
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
I tried this code:
In 2021 edition.
On 1.58.1 this compiles, but on 1.59.0 and later it fails to build:
Version it worked on
It most recently worked on: 1.58.1
Version with regression
1.59.0 stable on Rust playground, as well as the following nightly version:
The text was updated successfully, but these errors were encountered: