diff options
| author | bors <bors@rust-lang.org> | 2020-01-10 02:09:41 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-01-10 02:09:41 +0000 |
| commit | 2d8d559bbecf6272eb41f8a800e319238aa9d621 (patch) | |
| tree | c714e372e75f080c46ed07608912aa7df4211f9b /src/test/ui/parser | |
| parent | 72b2bd55edbb1e63a930c5ddd08b25e4f9044786 (diff) | |
| parent | 6f3f1c537b18f95bd4ea42700a1776334b165984 (diff) | |
Auto merge of #68078 - Centril:rollup-qvq052k, r=Centril
Rollup of 6 pull requests Successful merges: - #66463 (Point at opaque and closure type definitions in type errors) - #67501 (Reduce special treatment for zsts) - #67820 (Parse the syntax described in RFC 2632) - #67922 (rustc_ast_lowering: misc cleanup & rustc dep reductions) - #68071 (Extend support of `_` in type parameters) - #68073 (expect `fn` after `const unsafe` / `const extern`) Failed merges: r? @ghost
Diffstat (limited to 'src/test/ui/parser')
| -rw-r--r-- | src/test/ui/parser/bounds-type.rs | 5 | ||||
| -rw-r--r-- | src/test/ui/parser/bounds-type.stderr | 8 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/test/ui/parser/bounds-type.rs b/src/test/ui/parser/bounds-type.rs index 9122cb49ebc..7a187a0518a 100644 --- a/src/test/ui/parser/bounds-type.rs +++ b/src/test/ui/parser/bounds-type.rs @@ -8,6 +8,11 @@ struct S< T: ?for<'a> Trait, // OK 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 >; fn main() {} diff --git a/src/test/ui/parser/bounds-type.stderr b/src/test/ui/parser/bounds-type.stderr index 0b714e40a10..9a1f2ed3982 100644 --- a/src/test/ui/parser/bounds-type.stderr +++ b/src/test/ui/parser/bounds-type.stderr @@ -4,5 +4,11 @@ error: `?` may only modify trait bounds, not lifetime bounds LL | T: ?'a, | ^ -error: aborting due to previous error +error: `?const` may only modify trait bounds, not lifetime bounds + --> $DIR/bounds-type.rs:15:8 + | +LL | T: ?const 'a, + | ^^^^^^ + +error: aborting due to 2 previous errors |
