diff options
| author | Maybe Waffle <waffle.lapkin@gmail.com> | 2022-08-21 14:58:42 +0400 |
|---|---|---|
| committer | Maybe Waffle <waffle.lapkin@gmail.com> | 2022-08-21 14:58:42 +0400 |
| commit | 5d5e451618d3f364ce4a19d1d2c4f8903bc30dde (patch) | |
| tree | 17938856a35195a320759ed31d3ccc9f03a5e879 /src/test | |
| parent | 798016c2df3a15da739e8c6d0968ba0f7b54e303 (diff) | |
recover `const Tr` bounds (no `~`)
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/rfc-2632-const-trait-impl/without-tilde.rs | 3 | ||||
| -rw-r--r-- | src/test/ui/rfc-2632-const-trait-impl/without-tilde.stderr | 14 |
2 files changed, 6 insertions, 11 deletions
diff --git a/src/test/ui/rfc-2632-const-trait-impl/without-tilde.rs b/src/test/ui/rfc-2632-const-trait-impl/without-tilde.rs index e0d3e0b497b..d63381b5f2c 100644 --- a/src/test/ui/rfc-2632-const-trait-impl/without-tilde.rs +++ b/src/test/ui/rfc-2632-const-trait-impl/without-tilde.rs @@ -3,5 +3,4 @@ #![feature(const_trait_impl)] struct S<T: const Tr>; -//~^ ERROR expected identifier, found keyword `const` -//~| ERROR expected one of `(`, `+`, `,`, `::`, `<`, `=`, or `>`, found `Tr` +//~^ ERROR const bounds must start with `~` diff --git a/src/test/ui/rfc-2632-const-trait-impl/without-tilde.stderr b/src/test/ui/rfc-2632-const-trait-impl/without-tilde.stderr index 243f0979509..31300354a57 100644 --- a/src/test/ui/rfc-2632-const-trait-impl/without-tilde.stderr +++ b/src/test/ui/rfc-2632-const-trait-impl/without-tilde.stderr @@ -1,14 +1,10 @@ -error: expected identifier, found keyword `const` +error: const bounds must start with `~` --> $DIR/without-tilde.rs:5:13 | LL | struct S<T: const Tr>; - | ^^^^^ expected identifier, found keyword + | -^^^^ + | | + | help: add `~`: `~` -error: expected one of `(`, `+`, `,`, `::`, `<`, `=`, or `>`, found `Tr` - --> $DIR/without-tilde.rs:5:19 - | -LL | struct S<T: const Tr>; - | ^^ expected one of 7 possible tokens - -error: aborting due to 2 previous errors +error: aborting due to previous error |
