diff options
| author | Esteban Kuber <esteban@kuber.com.ar> | 2021-12-16 05:06:44 +0000 |
|---|---|---|
| committer | Esteban Kuber <esteban@kuber.com.ar> | 2022-03-08 00:19:08 +0000 |
| commit | ab4feea50dd3e0109a30488300c213ca074d01a6 (patch) | |
| tree | cad0af4e6d654a9ba06ba49bdd41a33a6033ec1a /src/test/ui/recursion | |
| parent | 084ca79e7c721e5b670eb4e4da4b45519c0822cb (diff) | |
Point at uncovered variants in enum definition in `note` instead of a `span_label`
This makes the order of the output always consistent: 1. Place of the `match` missing arms 2. The `enum` definition span 3. The structured suggestion to add a fallthrough arm
Diffstat (limited to 'src/test/ui/recursion')
| -rw-r--r-- | src/test/ui/recursion/recursive-types-are-not-uninhabited.stderr | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/test/ui/recursion/recursive-types-are-not-uninhabited.stderr b/src/test/ui/recursion/recursive-types-are-not-uninhabited.stderr index f904a0ecd11..ded3cf3ad1d 100644 --- a/src/test/ui/recursion/recursive-types-are-not-uninhabited.stderr +++ b/src/test/ui/recursion/recursive-types-are-not-uninhabited.stderr @@ -4,13 +4,20 @@ error[E0005]: refutable pattern in local binding: `Err(_)` not covered LL | let Ok(x) = res; | ^^^^^ pattern `Err(_)` not covered | - ::: $SRC_DIR/core/src/result.rs:LL:COL - | -LL | Err(#[stable(feature = "rust1", since = "1.0.0")] E), - | --- not covered - | = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html +note: `Result<u32, &R>` defined here + --> $SRC_DIR/core/src/result.rs:LL:COL + | +LL | / pub enum Result<T, E> { +LL | | /// Contains the success value +LL | | #[lang = "Ok"] +LL | | #[stable(feature = "rust1", since = "1.0.0")] +... | +LL | | Err(#[stable(feature = "rust1", since = "1.0.0")] E), + | | ^^^ not covered +LL | | } + | |_- = note: the matched value is of type `Result<u32, &R>` help: you might want to use `if let` to ignore the variant that isn't matched | |
