diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-07-18 08:09:01 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-18 08:09:01 +0200 |
| commit | b52883decfbaf8f63d4c7664cb8550d482fd54dc (patch) | |
| tree | cd891c9c6a92cf8a2ef4bfa5a95bcd107faa68be /tests/ui/error-codes | |
| parent | a13d7dbecf6ea190b1edb274702e09a6e42b7838 (diff) | |
| parent | 8eb51852a87dd2640fbd95019ff1124b38ae8b78 (diff) | |
| download | rust-b52883decfbaf8f63d4c7664cb8550d482fd54dc.tar.gz rust-b52883decfbaf8f63d4c7664cb8550d482fd54dc.zip | |
Rollup merge of #127886 - estebank:as-rename-suggestion, r=compiler-errors
Accurate `use` rename suggestion span When suggesting to rename an import with `as`, use a smaller span to render the suggestion with a better format: ``` error[E0252]: the name `baz` is defined multiple times --> $DIR/issue-25396.rs:4:5 | LL | use foo::baz; | -------- previous import of the module `baz` here LL | use bar::baz; | ^^^^^^^^ `baz` reimported here | = note: `baz` must be defined only once in the type namespace of this module help: you can use `as` to change the binding name of the import | LL | use bar::baz as other_baz; | ++++++++++++ ```
Diffstat (limited to 'tests/ui/error-codes')
| -rw-r--r-- | tests/ui/error-codes/E0252.stderr | 2 | ||||
| -rw-r--r-- | tests/ui/error-codes/E0254.stderr | 2 | ||||
| -rw-r--r-- | tests/ui/error-codes/E0255.stderr | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/tests/ui/error-codes/E0252.stderr b/tests/ui/error-codes/E0252.stderr index efbb9ec96de..16574964eb3 100644 --- a/tests/ui/error-codes/E0252.stderr +++ b/tests/ui/error-codes/E0252.stderr @@ -10,7 +10,7 @@ LL | use bar::baz; help: you can use `as` to change the binding name of the import | LL | use bar::baz as other_baz; - | ~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++ error: aborting due to 1 previous error diff --git a/tests/ui/error-codes/E0254.stderr b/tests/ui/error-codes/E0254.stderr index d89497b2804..592b8766d6b 100644 --- a/tests/ui/error-codes/E0254.stderr +++ b/tests/ui/error-codes/E0254.stderr @@ -11,7 +11,7 @@ LL | use foo::alloc; help: you can use `as` to change the binding name of the import | LL | use foo::alloc as other_alloc; - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++ error: aborting due to 1 previous error diff --git a/tests/ui/error-codes/E0255.stderr b/tests/ui/error-codes/E0255.stderr index e5f908217e1..b67a334f02c 100644 --- a/tests/ui/error-codes/E0255.stderr +++ b/tests/ui/error-codes/E0255.stderr @@ -11,7 +11,7 @@ LL | fn foo() {} help: you can use `as` to change the binding name of the import | LL | use bar::foo as other_foo; - | ~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++ error: aborting due to 1 previous error |
