Skip to content

Conversation

@Unique-Usman
Copy link
Contributor

@Unique-Usman Unique-Usman commented Jan 9, 2026

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=}).

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 9, 2026
@rustbot
Copy link
Collaborator

rustbot commented Jan 9, 2026

r? @JonathanBrouwer

rustbot has assigned @JonathanBrouwer.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot

This comment has been minimized.

@Unique-Usman Unique-Usman marked this pull request as draft January 9, 2026 21:30
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 9, 2026
@Unique-Usman
Copy link
Contributor Author

@estebank, kindly help take a look. I got stuck in implementing the suggestion part.

140bb59

@rust-log-analyzer

This comment has been minimized.

@Unique-Usman Unique-Usman changed the title Ua/debug rustc_parse_format: improve diagnostics for unsupported debug = syntax Jan 11, 2026
@rust-log-analyzer

This comment has been minimized.

@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 12, 2026

☔ The latest upstream changes (presumably #151003) made this pull request unmergeable. Please resolve the merge conflicts.

@Unique-Usman Unique-Usman marked this pull request as ready for review January 14, 2026 19:10
@rustbot
Copy link
Collaborator

rustbot commented Jan 14, 2026

Some changes occurred in src/tools/cargo

cc @ehuss

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 14, 2026
@rustbot

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@Unique-Usman
Copy link
Contributor Author

Unique-Usman commented Jan 14, 2026

r? @estebank

@rustbot rustbot assigned estebank and unassigned JonathanBrouwer Jan 14, 2026
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@Unique-Usman
Copy link
Contributor Author

@estebank thanks for the review. I made the necessary changes.

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 from `println!("{=}", x)` to `dbg!({x})`.

Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants