about summary refs log tree commit diff
path: root/tests/ui/consts/const-pattern-irrefutable.stderr
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2024-11-06 21:28:26 +0000
committerEsteban Küber <esteban@kuber.com.ar>2024-11-17 23:40:00 +0000
commit6dc79f6133d24100cecbcb24e256b9f149d2b47a (patch)
tree048ff29e80fe93d338fa602a8c2119010d5b787c /tests/ui/consts/const-pattern-irrefutable.stderr
parentc25b44bee96e4489dab8f44409ba347bfeb328b9 (diff)
downloadrust-6dc79f6133d24100cecbcb24e256b9f149d2b47a.tar.gz
rust-6dc79f6133d24100cecbcb24e256b9f149d2b47a.zip
Use `item_name` instead of a span snippet when talking about const pattern
Diffstat (limited to 'tests/ui/consts/const-pattern-irrefutable.stderr')
-rw-r--r--tests/ui/consts/const-pattern-irrefutable.stderr4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/ui/consts/const-pattern-irrefutable.stderr b/tests/ui/consts/const-pattern-irrefutable.stderr
index d4365fa16e8..c118ce9e48f 100644
--- a/tests/ui/consts/const-pattern-irrefutable.stderr
+++ b/tests/ui/consts/const-pattern-irrefutable.stderr
@@ -18,13 +18,13 @@ error[E0005]: refutable pattern in local binding
   --> $DIR/const-pattern-irrefutable.rs:19:9
    |
 LL |     pub const b: u8 = 2;
-   |     --------------- missing patterns are not covered because `c` is interpreted as a constant pattern, not a new variable
+   |     --------------- missing patterns are not covered because `b` is interpreted as a constant pattern, not a new variable
 ...
 LL |     let c = 4;
    |         ^
    |         |
    |         patterns `0_u8..=1_u8` and `3_u8..=u8::MAX` not covered
-   |         help: introduce a variable instead: `c_var`
+   |         help: introduce a variable instead: `b_var`
    |
    = 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