Skip to content

Commit ca53cda

Browse files
Bless new diagnostics
1 parent e390944 commit ca53cda

6 files changed

+6
-6
lines changed

src/test/ui/consts/const_in_pattern/reject_non_partial_eq.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ fn main() {
2626

2727
match None {
2828
NO_PARTIAL_EQ_NONE => println!("NO_PARTIAL_EQ_NONE"),
29-
//~^ ERROR must be annotated with `#[derive(PartialEq, Eq)]`
29+
//~^ ERROR must implement `PartialEq`
3030
_ => panic!("whoops"),
3131
}
3232
}

src/test/ui/consts/const_in_pattern/reject_non_partial_eq.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: to use a constant of type `NoPartialEq` in a pattern, `NoPartialEq` must be annotated with `#[derive(PartialEq, Eq)]`
1+
error: `std::option::Option<NoPartialEq>` must implement `PartialEq` to be used in a pattern
22
--> $DIR/reject_non_partial_eq.rs:28:9
33
|
44
LL | NO_PARTIAL_EQ_NONE => println!("NO_PARTIAL_EQ_NONE"),

src/test/ui/match/issue-70972-dyn-trait.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ fn main() {
44
let a: &dyn Send = &7u32;
55
match a {
66
F => panic!(),
7-
//~^ ERROR trait objects cannot be used in patterns
7+
//~^ ERROR must implement `PartialEq`
88
_ => {}
99
}
1010
}

src/test/ui/match/issue-70972-dyn-trait.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: trait objects cannot be used in patterns
1+
error: `&dyn std::marker::Send` must implement `PartialEq` to be used in a pattern
22
--> $DIR/issue-70972-dyn-trait.rs:6:9
33
|
44
LL | F => panic!(),

src/test/ui/rfc1445/issue-61188-match-slice-forbidden-without-eq.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const A: &[B] = &[];
1313
pub fn main() {
1414
match &[][..] {
1515
A => (),
16-
//~^ ERROR must be annotated with `#[derive(PartialEq, Eq)]`
16+
//~^ ERROR must implement `PartialEq`
1717
_ => (),
1818
}
1919
}

src/test/ui/rfc1445/issue-61188-match-slice-forbidden-without-eq.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: to use a constant of type `B` in a pattern, `B` must be annotated with `#[derive(PartialEq, Eq)]`
1+
error: `&[B]` must implement `PartialEq` to be used in a pattern
22
--> $DIR/issue-61188-match-slice-forbidden-without-eq.rs:15:9
33
|
44
LL | A => (),

0 commit comments

Comments
 (0)