-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
rustc_parse_format: improve diagnostics for unsupported debug = syntax #150897
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
base: main
Are you sure you want to change the base?
Conversation
|
rustbot has assigned @JonathanBrouwer. Use |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
140bb59 to
b56dc0f
Compare
This comment has been minimized.
This comment has been minimized.
|
☔ The latest upstream changes (presumably #151003) made this pull request unmergeable. Please resolve the merge conflicts. |
b56dc0f to
1c6894f
Compare
|
Some changes occurred in src/tools/cargo cc @ehuss |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1c6894f to
3db61bc
Compare
|
r? @estebank |
This comment has been minimized.
This comment has been minimized.
3db61bc to
f92a01c
Compare
This comment has been minimized.
This comment has been minimized.
Detect Python-style f-string debug syntax in format strings and emit a
clear diagnostic explaining that it is not supported in Rust. When the
intended operation can be inferred, suggest the corresponding Rust
alternative (e.g. `dbg!` for `{x=}`).
Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
f92a01c to
5e2726f
Compare
|
The job Click to see the possible cause of the failure (guessed by this bot) |
| @@ -0,0 +1,4 @@ | |||
| //@ run-rustfix | |||
| fn main() { | |||
| println!("{x=}"); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| println!("{x=}"); | |
| println!("{x=}"); //~ ERROR invalid format string: python's f-string debug |
Detect Python-style f-string debug syntax in format strings and emit a
clear diagnostic explaining that it is not supported in Rust. When the
intended operation can be inferred, suggest the corresponding Rust
alternative (e.g.
dbg!for{x=}).