Skip to content

Commit 1900351

Browse files
committed
Fix UI tests for 'const expression' change
1 parent 823f645 commit 1900351

14 files changed

+24
-24
lines changed

Diff for: src/test/ui/generic-associated-types/parse/trait-path-missing-gen_arg.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ trait X {
77

88
const _: () = {
99
fn f1<'a>(arg : Box<dyn X< : 32 >>) {}
10-
//~^ ERROR: expected one of `>`, const, lifetime, or type, found `:`
10+
//~^ ERROR: expected one of `>`, a const expression, lifetime, or type, found `:`
1111
//~| ERROR: expected parameter name, found `>`
1212
//~| ERROR: expected one of `!`, `)`, `+`, `,`, or `::`, found `>`
1313
//~| ERROR: constant provided when a type was expected
1414
};
1515

1616
const _: () = {
1717
fn f1<'a>(arg : Box<dyn X< = 32 >>) {}
18-
//~^ ERROR: expected one of `>`, const, lifetime, or type, found `=`
18+
//~^ ERROR: expected one of `>`, a const expression, lifetime, or type, found `=`
1919
};
2020

2121
fn main() {}

Diff for: src/test/ui/generic-associated-types/parse/trait-path-missing-gen_arg.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error: expected one of `>`, const, lifetime, or type, found `:`
1+
error: expected one of `>`, a const expression, lifetime, or type, found `:`
22
--> $DIR/trait-path-missing-gen_arg.rs:9:30
33
|
44
LL | fn f1<'a>(arg : Box<dyn X< : 32 >>) {}
5-
| ^ expected one of `>`, const, lifetime, or type
5+
| ^ expected one of `>`, a const expression, lifetime, or type
66
|
77
help: expressions must be enclosed in braces to be used as const generic arguments
88
|
@@ -24,11 +24,11 @@ LL | fn f1<'a>(arg : Box<dyn X< : 32 >>) {}
2424
| expected one of `!`, `)`, `+`, `,`, or `::`
2525
| help: missing `,`
2626

27-
error: expected one of `>`, const, lifetime, or type, found `=`
27+
error: expected one of `>`, a const expression, lifetime, or type, found `=`
2828
--> $DIR/trait-path-missing-gen_arg.rs:17:30
2929
|
3030
LL | fn f1<'a>(arg : Box<dyn X< = 32 >>) {}
31-
| ^ expected one of `>`, const, lifetime, or type
31+
| ^ expected one of `>`, a const expression, lifetime, or type
3232

3333
warning: the feature `generic_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes
3434
--> $DIR/trait-path-missing-gen_arg.rs:1:12

Diff for: src/test/ui/issues/issue-20616-3.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ type Type_1_<'a, T> = &'a T;
1111

1212

1313
type Type_3<T> = Box<T,,>;
14-
//~^ error: expected one of `>`, const, lifetime, or type, found `,`
14+
//~^ error: expected one of `>`, a const expression, lifetime, or type, found `,`
1515

1616

1717
//type Type_4<T> = Type_1_<'static,, T>; // error: expected type, found `,`

Diff for: src/test/ui/issues/issue-20616-3.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error: expected one of `>`, const, lifetime, or type, found `,`
1+
error: expected one of `>`, a const expression, lifetime, or type, found `,`
22
--> $DIR/issue-20616-3.rs:13:24
33
|
44
LL | type Type_3<T> = Box<T,,>;
5-
| ^ expected one of `>`, const, lifetime, or type
5+
| ^ expected one of `>`, a const expression, lifetime, or type
66

77
error: aborting due to previous error
88

Diff for: src/test/ui/issues/issue-20616-4.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ type Type_1_<'a, T> = &'a T;
1414

1515

1616
type Type_4<T> = Type_1_<'static,, T>;
17-
//~^ error: expected one of `>`, const, lifetime, or type, found `,`
17+
//~^ error: expected one of `>`, a const expression, lifetime, or type, found `,`
1818

1919

2020
type Type_5_<'a> = Type_1_<'a, ()>;

Diff for: src/test/ui/issues/issue-20616-4.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error: expected one of `>`, const, lifetime, or type, found `,`
1+
error: expected one of `>`, a const expression, lifetime, or type, found `,`
22
--> $DIR/issue-20616-4.rs:16:34
33
|
44
LL | type Type_4<T> = Type_1_<'static,, T>;
5-
| ^ expected one of `>`, const, lifetime, or type
5+
| ^ expected one of `>`, a const expression, lifetime, or type
66

77
error: aborting due to previous error
88

Diff for: src/test/ui/issues/issue-20616-5.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ type Type_5_<'a> = Type_1_<'a, ()>;
2020

2121

2222
type Type_5<'a> = Type_1_<'a, (),,>;
23-
//~^ error: expected one of `>`, const, lifetime, or type, found `,`
23+
//~^ error: expected one of `>`, a const expression, lifetime, or type, found `,`
2424

2525

2626
//type Type_6 = Type_5_<'a,,>; // error: expected type, found `,`

Diff for: src/test/ui/issues/issue-20616-5.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error: expected one of `>`, const, lifetime, or type, found `,`
1+
error: expected one of `>`, a const expression, lifetime, or type, found `,`
22
--> $DIR/issue-20616-5.rs:22:34
33
|
44
LL | type Type_5<'a> = Type_1_<'a, (),,>;
5-
| ^ expected one of `>`, const, lifetime, or type
5+
| ^ expected one of `>`, a const expression, lifetime, or type
66

77
error: aborting due to previous error
88

Diff for: src/test/ui/issues/issue-20616-6.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ type Type_5_<'a> = Type_1_<'a, ()>;
2323

2424

2525
type Type_6 = Type_5_<'a,,>;
26-
//~^ error: expected one of `>`, const, lifetime, or type, found `,`
26+
//~^ error: expected one of `>`, a const expression, lifetime, or type, found `,`
2727

2828

2929
//type Type_7 = Box<(),,>; // error: expected type, found `,`

Diff for: src/test/ui/issues/issue-20616-6.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error: expected one of `>`, const, lifetime, or type, found `,`
1+
error: expected one of `>`, a const expression, lifetime, or type, found `,`
22
--> $DIR/issue-20616-6.rs:25:26
33
|
44
LL | type Type_6 = Type_5_<'a,,>;
5-
| ^ expected one of `>`, const, lifetime, or type
5+
| ^ expected one of `>`, a const expression, lifetime, or type
66

77
error: aborting due to previous error
88

Diff for: src/test/ui/issues/issue-20616-7.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ type Type_5_<'a> = Type_1_<'a, ()>;
2626

2727

2828
type Type_7 = Box<(),,>;
29-
//~^ error: expected one of `>`, const, lifetime, or type, found `,`
29+
//~^ error: expected one of `>`, a const expression, lifetime, or type, found `,`
3030

3131

3232
//type Type_8<'a,,> = &'a (); // error: expected ident, found `,`

Diff for: src/test/ui/issues/issue-20616-7.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error: expected one of `>`, const, lifetime, or type, found `,`
1+
error: expected one of `>`, a const expression, lifetime, or type, found `,`
22
--> $DIR/issue-20616-7.rs:28:22
33
|
44
LL | type Type_7 = Box<(),,>;
5-
| ^ expected one of `>`, const, lifetime, or type
5+
| ^ expected one of `>`, a const expression, lifetime, or type
66

77
error: aborting due to previous error
88

Diff for: src/test/ui/parser/removed-syntax-uniq-mut-ty.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
type mut_box = Box<mut isize>;
2-
//~^ ERROR expected one of `>`, const, lifetime, or type, found keyword `mut`
2+
//~^ ERROR expected one of `>`, a const expression, lifetime, or type, found keyword `mut`

Diff for: src/test/ui/parser/removed-syntax-uniq-mut-ty.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error: expected one of `>`, const, lifetime, or type, found keyword `mut`
1+
error: expected one of `>`, a const expression, lifetime, or type, found keyword `mut`
22
--> $DIR/removed-syntax-uniq-mut-ty.rs:1:20
33
|
44
LL | type mut_box = Box<mut isize>;
5-
| ^^^ expected one of `>`, const, lifetime, or type
5+
| ^^^ expected one of `>`, a const expression, lifetime, or type
66

77
error: aborting due to previous error
88

0 commit comments

Comments
 (0)