Skip to content

Commit 900cf82

Browse files
TYPE -> TYPE_ASCRIPTIONG
1 parent 532ba46 commit 900cf82

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ fn main() {
4545
const TUPLE: (OND, OND) = (None, None);
4646
match (None, None) { TUPLE => dbg!(TUPLE), _ => panic!("whoops"), };
4747

48-
const TYPE: OND = None: OND;
49-
match None { TYPE => dbg!(TYPE), _ => panic!("whoops"), };
48+
const TYPE_ASCRIPTION: OND = None: OND;
49+
match None { TYPE_ASCRIPTION => dbg!(TYPE_ASCRIPTION), _ => panic!("whoops"), };
5050

5151
const ARRAY: [OND; 2] = [None, None];
5252
match [None; 2] { ARRAY => dbg!(ARRAY), _ => panic!("whoops"), };

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ fn main() {
5757
//~^ ERROR must be annotated with `#[derive(PartialEq, Eq)]`
5858
//~| ERROR must be annotated with `#[derive(PartialEq, Eq)]`
5959

60-
const TYPE: OND = Some(NoDerive): OND;
61-
match Some(NoDerive) { TYPE => dbg!(TYPE), _ => panic!("whoops"), };
60+
const TYPE_ASCRIPTION: OND = Some(NoDerive): OND;
61+
match Some(NoDerive) { TYPE_ASCRIPTION => dbg!(TYPE_ASCRIPTION), _ => panic!("whoops"), };
6262
//~^ ERROR must be annotated with `#[derive(PartialEq, Eq)]`
6363
//~| ERROR must be annotated with `#[derive(PartialEq, Eq)]`
6464

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ LL | match (None, Some(NoDerive)) { TUPLE => dbg!(TUPLE), _ => panic!("whoop
2525
error: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq, Eq)]`
2626
--> $DIR/reject_non_structural.rs:61:28
2727
|
28-
LL | match Some(NoDerive) { TYPE => dbg!(TYPE), _ => panic!("whoops"), };
29-
| ^^^^
28+
LL | match Some(NoDerive) { TYPE_ASCRIPTION => dbg!(TYPE_ASCRIPTION), _ => panic!("whoops"), };
29+
| ^^^^^^^^^^^^^^^
3030

3131
error: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq, Eq)]`
3232
--> $DIR/reject_non_structural.rs:66:36
@@ -99,8 +99,8 @@ LL | match (None, Some(NoDerive)) { TUPLE => dbg!(TUPLE), _ => panic!("whoop
9999
error: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq, Eq)]`
100100
--> $DIR/reject_non_structural.rs:61:28
101101
|
102-
LL | match Some(NoDerive) { TYPE => dbg!(TYPE), _ => panic!("whoops"), };
103-
| ^^^^
102+
LL | match Some(NoDerive) { TYPE_ASCRIPTION => dbg!(TYPE_ASCRIPTION), _ => panic!("whoops"), };
103+
| ^^^^^^^^^^^^^^^
104104

105105
error: to use a constant of type `NoDerive` in a pattern, `NoDerive` must be annotated with `#[derive(PartialEq, Eq)]`
106106
--> $DIR/reject_non_structural.rs:66:36

0 commit comments

Comments
 (0)