diff options
| author | Yuki Okushi <yuki.okushi@huawei.com> | 2021-10-17 04:51:22 +0900 |
|---|---|---|
| committer | Yuki Okushi <yuki.okushi@huawei.com> | 2021-10-17 04:51:22 +0900 |
| commit | d4cc8774d598dd496a3dee393271c9c69a07e2fa (patch) | |
| tree | 16d9fff74164eb1adabca2176861fbde9e50df0e /src | |
| parent | 7fbd4ce2768744b3bd2ddf8453b73f4f18dbe5bc (diff) | |
| download | rust-d4cc8774d598dd496a3dee393271c9c69a07e2fa.tar.gz rust-d4cc8774d598dd496a3dee393271c9c69a07e2fa.zip | |
Suggest a case insensitive match name regardless of levenshtein distance
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/ui/hygiene/rustc-macro-transparency.stderr | 16 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-22933-2.stderr | 5 |
2 files changed, 19 insertions, 2 deletions
diff --git a/src/test/ui/hygiene/rustc-macro-transparency.stderr b/src/test/ui/hygiene/rustc-macro-transparency.stderr index ef650b75b56..e4c1c8ad293 100644 --- a/src/test/ui/hygiene/rustc-macro-transparency.stderr +++ b/src/test/ui/hygiene/rustc-macro-transparency.stderr @@ -2,11 +2,14 @@ error[E0425]: cannot find value `Opaque` in this scope --> $DIR/rustc-macro-transparency.rs:26:5 | LL | Opaque; - | ^^^^^^ help: a local variable with a similar name exists (notice the capitalization): `opaque` + | ^^^^^^ not found in this scope error[E0423]: expected value, found macro `semitransparent` --> $DIR/rustc-macro-transparency.rs:29:5 | +LL | struct SemiTransparent; + | ----------------------- similarly named unit struct `SemiTransparent` defined here +... LL | semitransparent; | ^^^^^^^^^^^^^^^ not a value | @@ -14,10 +17,17 @@ help: use `!` to invoke the macro | LL | semitransparent!; | + +help: a unit struct with a similar name exists + | +LL | SemiTransparent; + | ~~~~~~~~~~~~~~~ error[E0423]: expected value, found macro `opaque` --> $DIR/rustc-macro-transparency.rs:30:5 | +LL | struct Opaque; + | -------------- similarly named unit struct `Opaque` defined here +... LL | opaque; | ^^^^^^ not a value | @@ -25,6 +35,10 @@ help: use `!` to invoke the macro | LL | opaque!; | + +help: a unit struct with a similar name exists + | +LL | Opaque; + | ~~~~~~ error: aborting due to 3 previous errors diff --git a/src/test/ui/issues/issue-22933-2.stderr b/src/test/ui/issues/issue-22933-2.stderr index 584b05ec44d..0bfbf538486 100644 --- a/src/test/ui/issues/issue-22933-2.stderr +++ b/src/test/ui/issues/issue-22933-2.stderr @@ -5,7 +5,10 @@ LL | enum Delicious { | -------------- variant or associated item `PIE` not found here ... LL | ApplePie = Delicious::Apple as isize | Delicious::PIE as isize, - | ^^^ variant or associated item not found in `Delicious` + | ^^^ + | | + | variant or associated item not found in `Delicious` + | help: there is a variant with a similar name: `Pie` error: aborting due to previous error |
