diff options
| author | Alan Egerton <eggyal@gmail.com> | 2024-04-12 12:33:03 +0100 |
|---|---|---|
| committer | Alan Egerton <eggyal@gmail.com> | 2024-04-12 17:45:15 +0100 |
| commit | ddcfb94b84835edad5a223db3f226c7b302d264c (patch) | |
| tree | 251e5003bcd0b8b23adadcc8d6aa1012a84fb0b8 /tests/ui/half-open-range-patterns | |
| parent | ab71ee7a9214c2793108a41efb065aa77aeb7326 (diff) | |
| download | rust-ddcfb94b84835edad5a223db3f226c7b302d264c.tar.gz rust-ddcfb94b84835edad5a223db3f226c7b302d264c.zip | |
Suppress erroneous suggestion
The suggestion to use `let else` with an uninitialized refutable `let` statement was erroneous: `let else` cannot be used with deferred initialization.
Diffstat (limited to 'tests/ui/half-open-range-patterns')
| -rw-r--r-- | tests/ui/half-open-range-patterns/half-open-range-pats-inclusive-dotdotdot-bad-syntax.stderr | 4 | ||||
| -rw-r--r-- | tests/ui/half-open-range-patterns/half-open-range-pats-inclusive-no-end.stderr | 8 |
2 files changed, 0 insertions, 12 deletions
diff --git a/tests/ui/half-open-range-patterns/half-open-range-pats-inclusive-dotdotdot-bad-syntax.stderr b/tests/ui/half-open-range-patterns/half-open-range-pats-inclusive-dotdotdot-bad-syntax.stderr index 6832f21f25e..0d2aae689f0 100644 --- a/tests/ui/half-open-range-patterns/half-open-range-pats-inclusive-dotdotdot-bad-syntax.stderr +++ b/tests/ui/half-open-range-patterns/half-open-range-pats-inclusive-dotdotdot-bad-syntax.stderr @@ -46,10 +46,6 @@ LL | mac!(0); = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html = note: the matched value is of type `i32` = note: this error originates in the macro `mac` (in Nightly builds, run with -Z macro-backtrace for more info) -help: you might want to use `if let` to ignore the variant that isn't matched - | -LL | if let ...$e; { todo!() } - | ++ +++++++++++ error: aborting due to 6 previous errors diff --git a/tests/ui/half-open-range-patterns/half-open-range-pats-inclusive-no-end.stderr b/tests/ui/half-open-range-patterns/half-open-range-pats-inclusive-no-end.stderr index cb9e48e70e3..9ba0e09e154 100644 --- a/tests/ui/half-open-range-patterns/half-open-range-pats-inclusive-no-end.stderr +++ b/tests/ui/half-open-range-patterns/half-open-range-pats-inclusive-no-end.stderr @@ -67,10 +67,6 @@ LL | mac!(0); = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html = note: the matched value is of type `i32` = note: this error originates in the macro `mac` (in Nightly builds, run with -Z macro-backtrace for more info) -help: you might want to use `if let` to ignore the variant that isn't matched - | -LL | if let $e...; { todo!() } - | ++ +++++++++++ error[E0005]: refutable pattern in local binding --> $DIR/half-open-range-pats-inclusive-no-end.rs:20:17 @@ -85,10 +81,6 @@ LL | mac!(0); = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html = note: the matched value is of type `i32` = note: this error originates in the macro `mac` (in Nightly builds, run with -Z macro-backtrace for more info) -help: you might want to use `if let` to ignore the variant that isn't matched - | -LL | if let $e..=; { todo!() } - | ++ +++++++++++ error: aborting due to 8 previous errors |
