about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorOliver Scherer <github35764891676564198441@oli-obk.de>2020-09-24 10:06:07 +0200
committerOliver Scherer <github35764891676564198441@oli-obk.de>2020-09-24 10:06:07 +0200
commite4928d77a1eceea9f53e30bd6af9fdf5be205fae (patch)
treeb828c62481db8a81a23d13e1fe97a4f671955f1e /src
parent2bc54d427377d3f5d949434a9eb8a9ba71db69a4 (diff)
downloadrust-e4928d77a1eceea9f53e30bd6af9fdf5be205fae.tar.gz
rust-e4928d77a1eceea9f53e30bd6af9fdf5be205fae.zip
Use correct type in diagnostics again
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/consts/const_in_pattern/custom-eq-branch-warn.stderr2
-rw-r--r--src/test/ui/consts/const_in_pattern/reject_non_partial_eq.stderr2
-rw-r--r--src/test/ui/consts/const_in_pattern/warn_corner_cases.stderr6
3 files changed, 5 insertions, 5 deletions
diff --git a/src/test/ui/consts/const_in_pattern/custom-eq-branch-warn.stderr b/src/test/ui/consts/const_in_pattern/custom-eq-branch-warn.stderr
index fd6732195e4..e51d6f91649 100644
--- a/src/test/ui/consts/const_in_pattern/custom-eq-branch-warn.stderr
+++ b/src/test/ui/consts/const_in_pattern/custom-eq-branch-warn.stderr
@@ -1,4 +1,4 @@
-warning: to use a constant of type `Foo` in a pattern, the constant's initializer must be trivial or all types in the constant must be annotated with `#[derive(PartialEq, Eq)]`
+warning: to use a constant of type `CustomEq` in a pattern, the constant's initializer must be trivial or `CustomEq` must be annotated with `#[derive(PartialEq, Eq)]`
   --> $DIR/custom-eq-branch-warn.rs:29:9
    |
 LL |         BAR_BAZ => panic!(),
diff --git a/src/test/ui/consts/const_in_pattern/reject_non_partial_eq.stderr b/src/test/ui/consts/const_in_pattern/reject_non_partial_eq.stderr
index 8462c32ea80..95cfa4a9ebe 100644
--- a/src/test/ui/consts/const_in_pattern/reject_non_partial_eq.stderr
+++ b/src/test/ui/consts/const_in_pattern/reject_non_partial_eq.stderr
@@ -1,4 +1,4 @@
-error: to use a constant of type `Option<NoPartialEq>` in a pattern, `Option<NoPartialEq>` must be annotated with `#[derive(PartialEq, Eq)]`
+error: to use a constant of type `NoPartialEq` in a pattern, `NoPartialEq` must be annotated with `#[derive(PartialEq, Eq)]`
   --> $DIR/reject_non_partial_eq.rs:28:9
    |
 LL |         NO_PARTIAL_EQ_NONE => println!("NO_PARTIAL_EQ_NONE"),
diff --git a/src/test/ui/consts/const_in_pattern/warn_corner_cases.stderr b/src/test/ui/consts/const_in_pattern/warn_corner_cases.stderr
index a4feaff55b2..a24c8d18184 100644
--- a/src/test/ui/consts/const_in_pattern/warn_corner_cases.stderr
+++ b/src/test/ui/consts/const_in_pattern/warn_corner_cases.stderr
@@ -1,4 +1,4 @@
-warning: to use a constant of type `Option<NoDerive>` in a pattern, the constant's initializer must be trivial or all types in the constant must be annotated with `#[derive(PartialEq, Eq)]`
+warning: to use a constant of type `NoDerive` in a pattern, the constant's initializer must be trivial or `NoDerive` must be annotated with `#[derive(PartialEq, Eq)]`
   --> $DIR/warn_corner_cases.rs:26:47
    |
 LL |     match None { Some(_) => panic!("whoops"), INDEX => dbg!(INDEX), };
@@ -8,7 +8,7 @@ LL |     match None { Some(_) => panic!("whoops"), INDEX => dbg!(INDEX), };
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #73448 <https://github.com/rust-lang/rust/issues/73448>
 
-warning: to use a constant of type `Option<NoDerive>` in a pattern, the constant's initializer must be trivial or all types in the constant must be annotated with `#[derive(PartialEq, Eq)]`
+warning: to use a constant of type `NoDerive` in a pattern, the constant's initializer must be trivial or `NoDerive` must be annotated with `#[derive(PartialEq, Eq)]`
   --> $DIR/warn_corner_cases.rs:32:47
    |
 LL |     match None { Some(_) => panic!("whoops"), CALL => dbg!(CALL), };
@@ -17,7 +17,7 @@ LL |     match None { Some(_) => panic!("whoops"), CALL => dbg!(CALL), };
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #73448 <https://github.com/rust-lang/rust/issues/73448>
 
-warning: to use a constant of type `Option<NoDerive>` in a pattern, the constant's initializer must be trivial or all types in the constant must be annotated with `#[derive(PartialEq, Eq)]`
+warning: to use a constant of type `NoDerive` in a pattern, the constant's initializer must be trivial or `NoDerive` must be annotated with `#[derive(PartialEq, Eq)]`
   --> $DIR/warn_corner_cases.rs:38:47
    |
 LL |     match None { Some(_) => panic!("whoops"), METHOD_CALL => dbg!(METHOD_CALL), };