Various changes to string format diagnostics#57069
Conversation
|
r? @cramertj (rust_highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@bors r+ |
|
📌 Commit e806538e1cd2d7bd041c70906d8110145d67923c has been approved by |
|
🌲 The tree is currently closed for pull requests below priority 500, this pull request will be tested once the tree is reopened |
|
☔ The latest upstream changes (presumably #57108) made this pull request unmergeable. Please resolve the merge conflicts. |
- Point at opening mismatched formatting brace - Account for differences between raw and regular strings - Account for differences between the code snippet and `InternedString` - Add more tests
|
📌 Commit 862ebc4 has been approved by |
Various changes to string format diagnostics
- Point at opening mismatched formatting brace
- Account for differences between raw and regular strings
- Account for differences between the code snippet and `InternedString`
- Add more tests
```
error: invalid format string: expected `'}'`, found `'t'`
--> $DIR/ifmt-bad-arg.rs:85:1
|
LL | ninth number: {
| - because of this opening brace
LL | tenth number: {}",
| ^ expected `}` in format string
|
= note: if you intended to print `{`, you can escape it using `{{`
```
Fix #53837.
|
☀️ Test successful - status-appveyor, status-travis |
|
📣 Toolstate changed by #57069! Tested on commit a1bad57. 💔 clippy-driver on windows: test-fail → build-fail (cc @Manishearth @llogiq @mcarton @oli-obk, @rust-lang/infra). |
Tested on commit rust-lang/rust@a1bad57. Direct link to PR: <rust-lang/rust#57069> 💔 clippy-driver on windows: test-fail → build-fail (cc @Manishearth @llogiq @mcarton @oli-obk, @rust-lang/infra). 💔 clippy-driver on linux: test-fail → build-fail (cc @Manishearth @llogiq @mcarton @oli-obk, @rust-lang/infra). 💔 rls on windows: test-pass → build-fail (cc @nrc @Xanewok, @rust-lang/infra). 💔 rls on linux: test-pass → build-fail (cc @nrc @Xanewok, @rust-lang/infra).
Fixes clippy toolstate Changes: ```` Match on ast/hir::ExprKind::Err Update *.stderr files Use -Zui-testing flag Mention S-inactive-closed PRs in the CONTRIBUTING.md tests: fix formatting and update test output base tests: make sure to fail CI if tests need formatting base tests: switch to nightly toolchain before checking formatting of tests with rustfmt rustup rust-lang#57069 Rustfmt. fix breakage from rust-lang#57088 fix a couple of ftrivial typos (NFC). update CARGO_CLIPPY_HELP string to suggest tool lints. rustc_tools_util: add readme rustc_tool_utils: expand Cargo.toml with a few keywords in preparation for crates.io release Fix macro detection in `empty_loop`. Changed `macro_backtrace()` to `in_macro()`. Fix lint detection on macro expansion. ````
submodules: update clippy from fc24fce to 721f688 Fixes clippy toolstate. Changes: ```` rustup #57069 Rustfmt. fix breakage from #57088 fix a couple of ftrivial typos (NFC). update CARGO_CLIPPY_HELP string to suggest tool lints. rustc_tools_util: add readme rustc_tool_utils: expand Cargo.toml with a few keywords in preparation for crates.io release Fix macro detection in `empty_loop`. Changed `macro_backtrace()` to `in_macro()`. Fix lint detection on macro expansion. ```` r? @oli-obk
Fixes clippy toolstate Changes: ```` Match on ast/hir::ExprKind::Err Update *.stderr files Use -Zui-testing flag Mention S-inactive-closed PRs in the CONTRIBUTING.md tests: fix formatting and update test output base tests: make sure to fail CI if tests need formatting base tests: switch to nightly toolchain before checking formatting of tests with rustfmt rustup rust-lang/rust#57069 Rustfmt. fix breakage from rust-lang/rust#57088 fix a couple of ftrivial typos (NFC). update CARGO_CLIPPY_HELP string to suggest tool lints. rustc_tools_util: add readme rustc_tool_utils: expand Cargo.toml with a few keywords in preparation for crates.io release Fix macro detection in `empty_loop`. Changed `macro_backtrace()` to `in_macro()`. Fix lint detection on macro expansion. ````
InternedStringFix #53837.