diff options
| author | Deadbeef <ent3rm4n@gmail.com> | 2021-08-25 15:21:55 +0000 |
|---|---|---|
| committer | Deadbeef <ent3rm4n@gmail.com> | 2021-08-27 05:07:38 +0000 |
| commit | 703c557aaa48ba647f6fafea2330819a8bbe6734 (patch) | |
| tree | 0f9a09b4a0aaabed162d556b8fe4a05e2d9b3319 /src/test/ui/parser | |
| parent | ff24ac4f2b1415cc93e0cc3edb70097df6dae073 (diff) | |
Fix more tests
Diffstat (limited to 'src/test/ui/parser')
| -rw-r--r-- | src/test/ui/parser/bounds-type.rs | 8 | ||||
| -rw-r--r-- | src/test/ui/parser/bounds-type.stderr | 4 | ||||
| -rw-r--r-- | src/test/ui/parser/trait-object-delimiters.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/parser/trait-object-delimiters.stderr | 4 |
4 files changed, 9 insertions, 9 deletions
diff --git a/src/test/ui/parser/bounds-type.rs b/src/test/ui/parser/bounds-type.rs index 7a187a0518a..4ae4549ea58 100644 --- a/src/test/ui/parser/bounds-type.rs +++ b/src/test/ui/parser/bounds-type.rs @@ -9,10 +9,10 @@ struct S< T: Tr +, // OK T: ?'a, //~ ERROR `?` may only modify trait bounds, not lifetime bounds - T: ?const Tr, // OK - T: ?const ?Tr, // OK - T: ?const Tr + 'a, // OK - T: ?const 'a, //~ ERROR `?const` may only modify trait bounds, not lifetime bounds + T: ~const Tr, // OK + T: ~const ?Tr, // OK + T: ~const Tr + 'a, // OK + T: ~const 'a, //~ ERROR `~const` may only modify trait bounds, not lifetime bounds >; fn main() {} diff --git a/src/test/ui/parser/bounds-type.stderr b/src/test/ui/parser/bounds-type.stderr index 9a1f2ed3982..005bc1e54bd 100644 --- a/src/test/ui/parser/bounds-type.stderr +++ b/src/test/ui/parser/bounds-type.stderr @@ -4,10 +4,10 @@ error: `?` may only modify trait bounds, not lifetime bounds LL | T: ?'a, | ^ -error: `?const` may only modify trait bounds, not lifetime bounds +error: `~const` may only modify trait bounds, not lifetime bounds --> $DIR/bounds-type.rs:15:8 | -LL | T: ?const 'a, +LL | T: ~const 'a, | ^^^^^^ error: aborting due to 2 previous errors diff --git a/src/test/ui/parser/trait-object-delimiters.rs b/src/test/ui/parser/trait-object-delimiters.rs index 650ab572261..b5258eebb90 100644 --- a/src/test/ui/parser/trait-object-delimiters.rs +++ b/src/test/ui/parser/trait-object-delimiters.rs @@ -6,7 +6,7 @@ fn foo1(_: &dyn Drop + AsRef<str>) {} //~ ERROR ambiguous `+` in a type fn foo2(_: &dyn (Drop + AsRef<str>)) {} //~ ERROR incorrect braces around trait bounds fn foo3(_: &dyn {Drop + AsRef<str>}) {} //~ ERROR expected parameter name, found `{` -//~^ ERROR expected one of `!`, `(`, `)`, `,`, `?`, `for`, lifetime, or path, found `{` +//~^ ERROR expected one of `!`, `(`, `)`, `,`, `?`, `for`, `~`, lifetime, or path, found `{` //~| ERROR at least one trait is required for an object type fn foo4(_: &dyn <Drop + AsRef<str>>) {} //~ ERROR expected identifier, found `<` diff --git a/src/test/ui/parser/trait-object-delimiters.stderr b/src/test/ui/parser/trait-object-delimiters.stderr index 1ae0205615c..ee638d8a4f5 100644 --- a/src/test/ui/parser/trait-object-delimiters.stderr +++ b/src/test/ui/parser/trait-object-delimiters.stderr @@ -22,11 +22,11 @@ error: expected parameter name, found `{` LL | fn foo3(_: &dyn {Drop + AsRef<str>}) {} | ^ expected parameter name -error: expected one of `!`, `(`, `)`, `,`, `?`, `for`, lifetime, or path, found `{` +error: expected one of `!`, `(`, `)`, `,`, `?`, `for`, `~`, lifetime, or path, found `{` --> $DIR/trait-object-delimiters.rs:8:17 | LL | fn foo3(_: &dyn {Drop + AsRef<str>}) {} - | -^ expected one of 8 possible tokens + | -^ expected one of 9 possible tokens | | | help: missing `,` |
