Revive tests
This commit is contained in:
parent
f3d96e9391
commit
0a3a6087fb
4 changed files with 28 additions and 0 deletions
6
src/test/ui/rfc-2632-const-trait-impl/tilde-twice.rs
Normal file
6
src/test/ui/rfc-2632-const-trait-impl/tilde-twice.rs
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
// compile-flags: -Z parse-only
|
||||||
|
|
||||||
|
#![feature(const_trait_impl)]
|
||||||
|
|
||||||
|
struct S<T: ~const ~const Tr>;
|
||||||
|
//~^ ERROR expected identifier, found `~`
|
8
src/test/ui/rfc-2632-const-trait-impl/tilde-twice.stderr
Normal file
8
src/test/ui/rfc-2632-const-trait-impl/tilde-twice.stderr
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
error: expected identifier, found `~`
|
||||||
|
--> $DIR/tilde-twice.rs:5:20
|
||||||
|
|
|
||||||
|
LL | struct S<T: ~const ~const Tr>;
|
||||||
|
| ^ expected identifier
|
||||||
|
|
||||||
|
error: aborting due to previous error
|
||||||
|
|
6
src/test/ui/rfc-2632-const-trait-impl/without-tilde.rs
Normal file
6
src/test/ui/rfc-2632-const-trait-impl/without-tilde.rs
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
// compiler-flags: -Z parse-only
|
||||||
|
|
||||||
|
#![feature(const_trait_impl)]
|
||||||
|
|
||||||
|
struct S<T: const Tr>;
|
||||||
|
//~^ ERROR expected one of `!`, `(`, `,`, `=`, `>`, `?`, `for`, `~`, lifetime, or path
|
|
@ -0,0 +1,8 @@
|
||||||
|
error: expected one of `!`, `(`, `,`, `=`, `>`, `?`, `for`, `~`, lifetime, or path, found keyword `const`
|
||||||
|
--> $DIR/without-tilde.rs:5:13
|
||||||
|
|
|
||||||
|
LL | struct S<T: const Tr>;
|
||||||
|
| ^^^^^ expected one of 10 possible tokens
|
||||||
|
|
||||||
|
error: aborting due to previous error
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue