about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-04-13 11:22:10 +0000
committerbors <bors@rust-lang.org>2021-04-13 11:22:10 +0000
commit5258a74c887f8ae14717e1f98b652b470877ce4e (patch)
tree5186511675b49b2d23ba9939e4574d06d7329538 /src/test
parent2e7eb85b1df5fce97e274569acf403c212aab517 (diff)
parent91c08288c4369fd746bfb334d4eecb403c61203e (diff)
downloadrust-5258a74c887f8ae14717e1f98b652b470877ce4e.tar.gz
rust-5258a74c887f8ae14717e1f98b652b470877ce4e.zip
Auto merge of #84153 - Dylan-DPC:rollup-5jiqrwu, r=Dylan-DPC
Rollup of 6 pull requests

Successful merges:

 - #83438 (Update RELEASES.md)
 - #83707 (Remove `T: Debug` bound on UnsafeCell Debug impl)
 - #84084 (Stabilize duration_zero.)
 - #84121 (Stabilize BTree{Map,Set}::retain)
 - #84140 (Don't call bump in check_mistyped_turbofish_with_multiple_type_params)
 - #84141 (Fix typo in error message)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/const-generics/diagnostics.stderr9
-rw-r--r--src/test/ui/parser/issue-84117.rs9
-rw-r--r--src/test/ui/parser/issue-84117.stderr49
3 files changed, 64 insertions, 3 deletions
diff --git a/src/test/ui/const-generics/diagnostics.stderr b/src/test/ui/const-generics/diagnostics.stderr
index 7d038ff955d..c8ee6ad61ec 100644
--- a/src/test/ui/const-generics/diagnostics.stderr
+++ b/src/test/ui/const-generics/diagnostics.stderr
@@ -31,9 +31,12 @@ error[E0747]: type provided when a constant was expected
   --> $DIR/diagnostics.rs:12:19
    |
 LL | impl<N> Foo for B<N> {}
-   |      -            ^
-   |      |
-   |      help: consider changing this type paramater to a `const`-generic: `const N: u8`
+   |                   ^
+   |
+help: consider changing this type parameter to be a `const` generic
+   |
+LL | impl<const N: u8> Foo for B<N> {}
+   |      ^^^^^^^^^^^
 
 error[E0747]: unresolved item provided when a constant was expected
   --> $DIR/diagnostics.rs:16:32
diff --git a/src/test/ui/parser/issue-84117.rs b/src/test/ui/parser/issue-84117.rs
new file mode 100644
index 00000000000..0f200735915
--- /dev/null
+++ b/src/test/ui/parser/issue-84117.rs
@@ -0,0 +1,9 @@
+fn main() {
+    let outer_local:e_outer<&str, { let inner_local:e_inner<&str, }
+    //~^ ERROR expected one of `>`, a const expression
+    //~| ERROR expected one of `>`, a const expression, lifetime, or type, found `}`
+    //~| ERROR expected one of `!`, `.`, `::`, `;`, `?`, `{`, or an operator, found `,`
+    //~| ERROR expected one of `!`, `.`, `::`, `;`, `?`, `{`, or an operator, found `,`
+    //~| ERROR expected one of `!`, `.`, `::`, `;`, `?`, `{`, or an operator, found `,`
+}
+//~^ ERROR expected one of `,`, `:`, `=`, or `>`, found `}`
diff --git a/src/test/ui/parser/issue-84117.stderr b/src/test/ui/parser/issue-84117.stderr
new file mode 100644
index 00000000000..d667a4977d0
--- /dev/null
+++ b/src/test/ui/parser/issue-84117.stderr
@@ -0,0 +1,49 @@
+error: expected one of `>`, a const expression, lifetime, or type, found `}`
+  --> $DIR/issue-84117.rs:2:67
+   |
+LL |     let outer_local:e_outer<&str, { let inner_local:e_inner<&str, }
+   |                                         ------------              ^ expected one of `>`, a const expression, lifetime, or type
+   |                                         |          |
+   |                                         |          help: use `=` if you meant to assign
+   |                                         while parsing the type for `inner_local`
+
+error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, or an operator, found `,`
+  --> $DIR/issue-84117.rs:2:65
+   |
+LL |     let outer_local:e_outer<&str, { let inner_local:e_inner<&str, }
+   |                                                                 ^ expected one of 7 possible tokens
+
+error: expected one of `,`, `:`, `=`, or `>`, found `}`
+  --> $DIR/issue-84117.rs:8:1
+   |
+LL |     let outer_local:e_outer<&str, { let inner_local:e_inner<&str, }
+   |         ------------ help: use `=` if you meant to assign          - expected one of `,`, `:`, `=`, or `>`
+   |         |
+   |         while parsing the type for `outer_local`
+...
+LL | }
+   | ^ unexpected token
+
+error: expected one of `>`, a const expression, lifetime, or type, found `}`
+  --> $DIR/issue-84117.rs:2:67
+   |
+LL |     let outer_local:e_outer<&str, { let inner_local:e_inner<&str, }
+   |                                         ------------              ^ expected one of `>`, a const expression, lifetime, or type
+   |                                         |          |
+   |                                         |          help: use `=` if you meant to assign
+   |                                         while parsing the type for `inner_local`
+
+error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, or an operator, found `,`
+  --> $DIR/issue-84117.rs:2:65
+   |
+LL |     let outer_local:e_outer<&str, { let inner_local:e_inner<&str, }
+   |                                                                 ^ expected one of 7 possible tokens
+
+error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, or an operator, found `,`
+  --> $DIR/issue-84117.rs:2:33
+   |
+LL |     let outer_local:e_outer<&str, { let inner_local:e_inner<&str, }
+   |                                 ^ expected one of 7 possible tokens
+
+error: aborting due to 6 previous errors
+