Fix UI tests for 'const expression' change
This commit is contained in:
parent
823f64532c
commit
19003517ce
@ -7,7 +7,7 @@ trait X {
|
|||||||
|
|
||||||
const _: () = {
|
const _: () = {
|
||||||
fn f1<'a>(arg : Box<dyn X< : 32 >>) {}
|
fn f1<'a>(arg : Box<dyn X< : 32 >>) {}
|
||||||
//~^ ERROR: expected one of `>`, const, lifetime, or type, found `:`
|
//~^ ERROR: expected one of `>`, a const expression, lifetime, or type, found `:`
|
||||||
//~| ERROR: expected parameter name, found `>`
|
//~| ERROR: expected parameter name, found `>`
|
||||||
//~| ERROR: expected one of `!`, `)`, `+`, `,`, or `::`, found `>`
|
//~| ERROR: expected one of `!`, `)`, `+`, `,`, or `::`, found `>`
|
||||||
//~| ERROR: constant provided when a type was expected
|
//~| ERROR: constant provided when a type was expected
|
||||||
@ -15,7 +15,7 @@ const _: () = {
|
|||||||
|
|
||||||
const _: () = {
|
const _: () = {
|
||||||
fn f1<'a>(arg : Box<dyn X< = 32 >>) {}
|
fn f1<'a>(arg : Box<dyn X< = 32 >>) {}
|
||||||
//~^ ERROR: expected one of `>`, const, lifetime, or type, found `=`
|
//~^ ERROR: expected one of `>`, a const expression, lifetime, or type, found `=`
|
||||||
};
|
};
|
||||||
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
error: expected one of `>`, const, lifetime, or type, found `:`
|
error: expected one of `>`, a const expression, lifetime, or type, found `:`
|
||||||
--> $DIR/trait-path-missing-gen_arg.rs:9:30
|
--> $DIR/trait-path-missing-gen_arg.rs:9:30
|
||||||
|
|
|
|
||||||
LL | fn f1<'a>(arg : Box<dyn X< : 32 >>) {}
|
LL | fn f1<'a>(arg : Box<dyn X< : 32 >>) {}
|
||||||
| ^ expected one of `>`, const, lifetime, or type
|
| ^ expected one of `>`, a const expression, lifetime, or type
|
||||||
|
|
|
|
||||||
help: expressions must be enclosed in braces to be used as const generic arguments
|
help: expressions must be enclosed in braces to be used as const generic arguments
|
||||||
|
|
|
|
||||||
@ -24,11 +24,11 @@ LL | fn f1<'a>(arg : Box<dyn X< : 32 >>) {}
|
|||||||
| expected one of `!`, `)`, `+`, `,`, or `::`
|
| expected one of `!`, `)`, `+`, `,`, or `::`
|
||||||
| help: missing `,`
|
| help: missing `,`
|
||||||
|
|
||||||
error: expected one of `>`, const, lifetime, or type, found `=`
|
error: expected one of `>`, a const expression, lifetime, or type, found `=`
|
||||||
--> $DIR/trait-path-missing-gen_arg.rs:17:30
|
--> $DIR/trait-path-missing-gen_arg.rs:17:30
|
||||||
|
|
|
|
||||||
LL | fn f1<'a>(arg : Box<dyn X< = 32 >>) {}
|
LL | fn f1<'a>(arg : Box<dyn X< = 32 >>) {}
|
||||||
| ^ expected one of `>`, const, lifetime, or type
|
| ^ expected one of `>`, a const expression, lifetime, or type
|
||||||
|
|
||||||
warning: the feature `generic_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes
|
warning: the feature `generic_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes
|
||||||
--> $DIR/trait-path-missing-gen_arg.rs:1:12
|
--> $DIR/trait-path-missing-gen_arg.rs:1:12
|
||||||
|
@ -11,7 +11,7 @@ type Type_1_<'a, T> = &'a T;
|
|||||||
|
|
||||||
|
|
||||||
type Type_3<T> = Box<T,,>;
|
type Type_3<T> = Box<T,,>;
|
||||||
//~^ error: expected one of `>`, const, lifetime, or type, found `,`
|
//~^ error: expected one of `>`, a const expression, lifetime, or type, found `,`
|
||||||
|
|
||||||
|
|
||||||
//type Type_4<T> = Type_1_<'static,, T>; // error: expected type, found `,`
|
//type Type_4<T> = Type_1_<'static,, T>; // error: expected type, found `,`
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
error: expected one of `>`, const, lifetime, or type, found `,`
|
error: expected one of `>`, a const expression, lifetime, or type, found `,`
|
||||||
--> $DIR/issue-20616-3.rs:13:24
|
--> $DIR/issue-20616-3.rs:13:24
|
||||||
|
|
|
|
||||||
LL | type Type_3<T> = Box<T,,>;
|
LL | type Type_3<T> = Box<T,,>;
|
||||||
| ^ expected one of `>`, const, lifetime, or type
|
| ^ expected one of `>`, a const expression, lifetime, or type
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ type Type_1_<'a, T> = &'a T;
|
|||||||
|
|
||||||
|
|
||||||
type Type_4<T> = Type_1_<'static,, T>;
|
type Type_4<T> = Type_1_<'static,, T>;
|
||||||
//~^ error: expected one of `>`, const, lifetime, or type, found `,`
|
//~^ error: expected one of `>`, a const expression, lifetime, or type, found `,`
|
||||||
|
|
||||||
|
|
||||||
type Type_5_<'a> = Type_1_<'a, ()>;
|
type Type_5_<'a> = Type_1_<'a, ()>;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
error: expected one of `>`, const, lifetime, or type, found `,`
|
error: expected one of `>`, a const expression, lifetime, or type, found `,`
|
||||||
--> $DIR/issue-20616-4.rs:16:34
|
--> $DIR/issue-20616-4.rs:16:34
|
||||||
|
|
|
|
||||||
LL | type Type_4<T> = Type_1_<'static,, T>;
|
LL | type Type_4<T> = Type_1_<'static,, T>;
|
||||||
| ^ expected one of `>`, const, lifetime, or type
|
| ^ expected one of `>`, a const expression, lifetime, or type
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ type Type_5_<'a> = Type_1_<'a, ()>;
|
|||||||
|
|
||||||
|
|
||||||
type Type_5<'a> = Type_1_<'a, (),,>;
|
type Type_5<'a> = Type_1_<'a, (),,>;
|
||||||
//~^ error: expected one of `>`, const, lifetime, or type, found `,`
|
//~^ error: expected one of `>`, a const expression, lifetime, or type, found `,`
|
||||||
|
|
||||||
|
|
||||||
//type Type_6 = Type_5_<'a,,>; // error: expected type, found `,`
|
//type Type_6 = Type_5_<'a,,>; // error: expected type, found `,`
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
error: expected one of `>`, const, lifetime, or type, found `,`
|
error: expected one of `>`, a const expression, lifetime, or type, found `,`
|
||||||
--> $DIR/issue-20616-5.rs:22:34
|
--> $DIR/issue-20616-5.rs:22:34
|
||||||
|
|
|
|
||||||
LL | type Type_5<'a> = Type_1_<'a, (),,>;
|
LL | type Type_5<'a> = Type_1_<'a, (),,>;
|
||||||
| ^ expected one of `>`, const, lifetime, or type
|
| ^ expected one of `>`, a const expression, lifetime, or type
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ type Type_5_<'a> = Type_1_<'a, ()>;
|
|||||||
|
|
||||||
|
|
||||||
type Type_6 = Type_5_<'a,,>;
|
type Type_6 = Type_5_<'a,,>;
|
||||||
//~^ error: expected one of `>`, const, lifetime, or type, found `,`
|
//~^ error: expected one of `>`, a const expression, lifetime, or type, found `,`
|
||||||
|
|
||||||
|
|
||||||
//type Type_7 = Box<(),,>; // error: expected type, found `,`
|
//type Type_7 = Box<(),,>; // error: expected type, found `,`
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
error: expected one of `>`, const, lifetime, or type, found `,`
|
error: expected one of `>`, a const expression, lifetime, or type, found `,`
|
||||||
--> $DIR/issue-20616-6.rs:25:26
|
--> $DIR/issue-20616-6.rs:25:26
|
||||||
|
|
|
|
||||||
LL | type Type_6 = Type_5_<'a,,>;
|
LL | type Type_6 = Type_5_<'a,,>;
|
||||||
| ^ expected one of `>`, const, lifetime, or type
|
| ^ expected one of `>`, a const expression, lifetime, or type
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ type Type_5_<'a> = Type_1_<'a, ()>;
|
|||||||
|
|
||||||
|
|
||||||
type Type_7 = Box<(),,>;
|
type Type_7 = Box<(),,>;
|
||||||
//~^ error: expected one of `>`, const, lifetime, or type, found `,`
|
//~^ error: expected one of `>`, a const expression, lifetime, or type, found `,`
|
||||||
|
|
||||||
|
|
||||||
//type Type_8<'a,,> = &'a (); // error: expected ident, found `,`
|
//type Type_8<'a,,> = &'a (); // error: expected ident, found `,`
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
error: expected one of `>`, const, lifetime, or type, found `,`
|
error: expected one of `>`, a const expression, lifetime, or type, found `,`
|
||||||
--> $DIR/issue-20616-7.rs:28:22
|
--> $DIR/issue-20616-7.rs:28:22
|
||||||
|
|
|
|
||||||
LL | type Type_7 = Box<(),,>;
|
LL | type Type_7 = Box<(),,>;
|
||||||
| ^ expected one of `>`, const, lifetime, or type
|
| ^ expected one of `>`, a const expression, lifetime, or type
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
type mut_box = Box<mut isize>;
|
type mut_box = Box<mut isize>;
|
||||||
//~^ ERROR expected one of `>`, const, lifetime, or type, found keyword `mut`
|
//~^ ERROR expected one of `>`, a const expression, lifetime, or type, found keyword `mut`
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
error: expected one of `>`, const, lifetime, or type, found keyword `mut`
|
error: expected one of `>`, a const expression, lifetime, or type, found keyword `mut`
|
||||||
--> $DIR/removed-syntax-uniq-mut-ty.rs:1:20
|
--> $DIR/removed-syntax-uniq-mut-ty.rs:1:20
|
||||||
|
|
|
|
||||||
LL | type mut_box = Box<mut isize>;
|
LL | type mut_box = Box<mut isize>;
|
||||||
| ^^^ expected one of `>`, const, lifetime, or type
|
| ^^^ expected one of `>`, a const expression, lifetime, or type
|
||||||
|
|
||||||
error: aborting due to previous error
|
error: aborting due to previous error
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user