Skip to content

Commit

Permalink
Fix UI tests for 'const expression' change
Browse files Browse the repository at this point in the history
  • Loading branch information
rylev committed Dec 4, 2020
1 parent 823f645 commit 1900351
Show file tree
Hide file tree
Showing 14 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ trait X {

const _: () = {
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 one of `!`, `)`, `+`, `,`, or `::`, found `>`
//~| ERROR: constant provided when a type was expected
};

const _: () = {
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() {}
Original file line number Diff line number Diff line change
@@ -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
|
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
|
Expand All @@ -24,11 +24,11 @@ LL | fn f1<'a>(arg : Box<dyn X< : 32 >>) {}
| expected one of `!`, `)`, `+`, `,`, or `::`
| 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
|
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
--> $DIR/trait-path-missing-gen_arg.rs:1:12
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-20616-3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type Type_1_<'a, T> = &'a 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 `,`
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/issues/issue-20616-3.stderr
Original file line number Diff line number Diff line change
@@ -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
|
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

2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-20616-4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type Type_1_<'a, T> = &'a 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, ()>;
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/issues/issue-20616-4.stderr
Original file line number Diff line number Diff line change
@@ -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
|
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

2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-20616-5.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ 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 `,`
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/issues/issue-20616-5.stderr
Original file line number Diff line number Diff line change
@@ -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
|
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

2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-20616-6.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type Type_5_<'a> = Type_1_<'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 `,`
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/issues/issue-20616-6.stderr
Original file line number Diff line number Diff line change
@@ -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
|
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

2 changes: 1 addition & 1 deletion src/test/ui/issues/issue-20616-7.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ type Type_5_<'a> = Type_1_<'a, ()>;


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 `,`
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/issues/issue-20616-7.stderr
Original file line number Diff line number Diff line change
@@ -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
|
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

2 changes: 1 addition & 1 deletion src/test/ui/parser/removed-syntax-uniq-mut-ty.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
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`
4 changes: 2 additions & 2 deletions src/test/ui/parser/removed-syntax-uniq-mut-ty.stderr
Original file line number Diff line number Diff line change
@@ -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
|
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

0 comments on commit 1900351

Please sign in to comment.