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.

@rust-bors

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

Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
@rustbot
Copy link
Collaborator

rustbot commented Feb 5, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@estebank
Copy link
Contributor

estebank commented Feb 9, 2026

@bors r+ rollup

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 9, 2026

❌ Encountered an error while executing command

JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 9, 2026
rustc_parse_format: improve diagnostics for unsupported debug = syntax

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=}`).
rust-bors bot pushed a commit that referenced this pull request Feb 10, 2026
…uwer

Rollup of 7 pull requests

Successful merges:

 - #151960 (rustc_parse: improve the error diagnostic for "missing let")
 - #152157 (Fix error spans for `asm!()` args that are macros)
 - #152317 (fix: sup_trace to sub_trace)
 - #150897 (rustc_parse_format: improve diagnostics for unsupported debug = syntax)
 - #151154 (Add `s390x-unknown-none-softfloat` with `RustcAbi::Softfloat`)
 - #152013 (Update to Xcode 26.2)
 - #152326 (Remove the compiler adhoc group)
@rust-bors rust-bors bot merged commit af70d82 into rust-lang:main Feb 10, 2026
11 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 10, 2026
@rustbot rustbot added this to the 1.95.0 milestone Feb 10, 2026
rust-timer added a commit that referenced this pull request Feb 10, 2026
Rollup merge of #150897 - Unique-Usman:ua/debug, r=estebank

rustc_parse_format: improve diagnostics for unsupported debug = syntax

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=}`).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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