summaryrefslogtreecommitdiffstats
path: root/tests/ui/parser/issues
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:41 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:41 +0000
commit4f9fe856a25ab29345b90e7725509e9ee38a37be (patch)
treee4ffd8a9374cae7b21f7cbfb352927e0e074aff6 /tests/ui/parser/issues
parentAdding upstream version 1.68.2+dfsg1. (diff)
downloadrustc-upstream/1.69.0+dfsg1.tar.xz
rustc-upstream/1.69.0+dfsg1.zip
Adding upstream version 1.69.0+dfsg1.upstream/1.69.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--tests/ui/parser/issues/issue-104367.rs6
-rw-r--r--tests/ui/parser/issues/issue-104367.stderr26
-rw-r--r--tests/ui/parser/issues/issue-105209.rs3
-rw-r--r--tests/ui/parser/issues/issue-105209.stderr22
-rw-r--r--tests/ui/parser/issues/issue-10636-2.rs4
-rw-r--r--tests/ui/parser/issues/issue-10636-2.stderr19
-rw-r--r--tests/ui/parser/issues/issue-44406.stderr4
-rw-r--r--tests/ui/parser/issues/issue-58094-missing-right-square-bracket.rs3
-rw-r--r--tests/ui/parser/issues/issue-58094-missing-right-square-bracket.stderr10
-rw-r--r--tests/ui/parser/issues/issue-58856-1.rs5
-rw-r--r--tests/ui/parser/issues/issue-58856-1.stderr29
-rw-r--r--tests/ui/parser/issues/issue-58856-2.rs5
-rw-r--r--tests/ui/parser/issues/issue-58856-2.stderr33
-rw-r--r--tests/ui/parser/issues/issue-60075.rs5
-rw-r--r--tests/ui/parser/issues/issue-60075.stderr20
-rw-r--r--tests/ui/parser/issues/issue-62524.rs2
-rw-r--r--tests/ui/parser/issues/issue-62524.stderr25
-rw-r--r--tests/ui/parser/issues/issue-62546.rs4
-rw-r--r--tests/ui/parser/issues/issue-62546.stderr15
-rw-r--r--tests/ui/parser/issues/issue-62554.rs1
-rw-r--r--tests/ui/parser/issues/issue-62554.stderr64
-rw-r--r--tests/ui/parser/issues/issue-62881.rs5
-rw-r--r--tests/ui/parser/issues/issue-62881.stderr24
-rw-r--r--tests/ui/parser/issues/issue-62894.rs1
-rw-r--r--tests/ui/parser/issues/issue-62894.stderr40
-rw-r--r--tests/ui/parser/issues/issue-62895.rs14
-rw-r--r--tests/ui/parser/issues/issue-62895.stderr51
-rw-r--r--tests/ui/parser/issues/issue-62973.rs2
-rw-r--r--tests/ui/parser/issues/issue-62973.stderr80
-rw-r--r--tests/ui/parser/issues/issue-63116.rs2
-rw-r--r--tests/ui/parser/issues/issue-63116.stderr25
-rw-r--r--tests/ui/parser/issues/issue-63135.rs4
-rw-r--r--tests/ui/parser/issues/issue-63135.stderr34
-rw-r--r--tests/ui/parser/issues/issue-66357-unexpected-unreachable.rs4
-rw-r--r--tests/ui/parser/issues/issue-66357-unexpected-unreachable.stderr17
-rw-r--r--tests/ui/parser/issues/issue-67377-invalid-syntax-in-enum-discriminant.rs14
-rw-r--r--tests/ui/parser/issues/issue-67377-invalid-syntax-in-enum-discriminant.stderr113
-rw-r--r--tests/ui/parser/issues/issue-68629.rsbin336 -> 129 bytes
-rw-r--r--tests/ui/parser/issues/issue-68629.stderrbin1637 -> 944 bytes
-rw-r--r--tests/ui/parser/issues/issue-69259.rs3
-rw-r--r--tests/ui/parser/issues/issue-69259.stderr8
-rw-r--r--tests/ui/parser/issues/issue-70583-block-is-empty-1.stderr4
-rw-r--r--tests/ui/parser/issues/issue-70583-block-is-empty-2.stderr6
-rw-r--r--tests/ui/parser/issues/issue-84104.rs1
-rw-r--r--tests/ui/parser/issues/issue-84104.stderr10
-rw-r--r--tests/ui/parser/issues/issue-84148-2.rs1
-rw-r--r--tests/ui/parser/issues/issue-84148-2.stderr21
-rw-r--r--tests/ui/parser/issues/issue-87086-colon-path-sep.rs1
-rw-r--r--tests/ui/parser/issues/issue-87086-colon-path-sep.stderr81
-rw-r--r--tests/ui/parser/issues/issue-87812-path.stderr2
-rw-r--r--tests/ui/parser/issues/issue-88770.rs3
-rw-r--r--tests/ui/parser/issues/issue-88770.stderr50
52 files changed, 255 insertions, 671 deletions
diff --git a/tests/ui/parser/issues/issue-104367.rs b/tests/ui/parser/issues/issue-104367.rs
new file mode 100644
index 000000000..861761b64
--- /dev/null
+++ b/tests/ui/parser/issues/issue-104367.rs
@@ -0,0 +1,6 @@
+#[derive(A)]
+struct S {
+ d: [u32; {
+ #![cfg] {
+ #![w,) //~ ERROR mismatched closing delimiter
+ //~ ERROR this file contains an unclosed delimiter
diff --git a/tests/ui/parser/issues/issue-104367.stderr b/tests/ui/parser/issues/issue-104367.stderr
new file mode 100644
index 000000000..e6e765357
--- /dev/null
+++ b/tests/ui/parser/issues/issue-104367.stderr
@@ -0,0 +1,26 @@
+error: mismatched closing delimiter: `)`
+ --> $DIR/issue-104367.rs:5:15
+ |
+LL | #![w,)
+ | ^ ^ mismatched closing delimiter
+ | |
+ | unclosed delimiter
+
+error: this file contains an unclosed delimiter
+ --> $DIR/issue-104367.rs:6:71
+ |
+LL | struct S {
+ | - unclosed delimiter
+LL | d: [u32; {
+ | - - unclosed delimiter
+ | |
+ | unclosed delimiter
+LL | #![cfg] {
+ | - unclosed delimiter
+LL | #![w,)
+ | - missing open `(` for this delimiter
+LL |
+ | ^
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/parser/issues/issue-105209.rs b/tests/ui/parser/issues/issue-105209.rs
new file mode 100644
index 000000000..6146b795d
--- /dev/null
+++ b/tests/ui/parser/issues/issue-105209.rs
@@ -0,0 +1,3 @@
+// compile-flags: -Zunpretty=ast-tree
+#![c={#![c[)x //~ ERROR mismatched closing delimiter
+ //~ ERROR this file contains an unclosed delimiter
diff --git a/tests/ui/parser/issues/issue-105209.stderr b/tests/ui/parser/issues/issue-105209.stderr
new file mode 100644
index 000000000..c75eafa18
--- /dev/null
+++ b/tests/ui/parser/issues/issue-105209.stderr
@@ -0,0 +1,22 @@
+error: mismatched closing delimiter: `)`
+ --> $DIR/issue-105209.rs:2:11
+ |
+LL | #![c={#![c[)x
+ | ^^ mismatched closing delimiter
+ | |
+ | unclosed delimiter
+
+error: this file contains an unclosed delimiter
+ --> $DIR/issue-105209.rs:3:68
+ |
+LL | #![c={#![c[)x
+ | - - - - missing open `(` for this delimiter
+ | | | |
+ | | | unclosed delimiter
+ | | unclosed delimiter
+ | unclosed delimiter
+LL |
+ | ^
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/parser/issues/issue-10636-2.rs b/tests/ui/parser/issues/issue-10636-2.rs
index 6fb63639d..80d8ef65a 100644
--- a/tests/ui/parser/issues/issue-10636-2.rs
+++ b/tests/ui/parser/issues/issue-10636-2.rs
@@ -1,11 +1,11 @@
+// error-pattern: mismatched closing delimiter: `}`
// FIXME(31528) we emit a bunch of silly errors here due to continuing past the
// first one. This would be easy-ish to address by better recovery in tokenisation.
pub fn trace_option(option: Option<isize>) {
option.map(|some| 42;
- //~^ ERROR: expected one of
+
}
-//~^ ERROR: expected expression, found `)`
fn main() {}
diff --git a/tests/ui/parser/issues/issue-10636-2.stderr b/tests/ui/parser/issues/issue-10636-2.stderr
index d4f2da9e3..4cd4be180 100644
--- a/tests/ui/parser/issues/issue-10636-2.stderr
+++ b/tests/ui/parser/issues/issue-10636-2.stderr
@@ -1,16 +1,13 @@
-error: expected one of `)`, `,`, `.`, `?`, or an operator, found `;`
- --> $DIR/issue-10636-2.rs:5:15
+error: mismatched closing delimiter: `}`
+ --> $DIR/issue-10636-2.rs:6:15
|
+LL | pub fn trace_option(option: Option<isize>) {
+ | - closing delimiter possibly meant for this
LL | option.map(|some| 42;
- | ^ ^ help: `)` may belong here
- | |
- | unclosed delimiter
-
-error: expected expression, found `)`
- --> $DIR/issue-10636-2.rs:8:1
- |
+ | ^ unclosed delimiter
+...
LL | }
- | ^ expected expression
+ | ^ mismatched closing delimiter
-error: aborting due to 2 previous errors
+error: aborting due to previous error
diff --git a/tests/ui/parser/issues/issue-44406.stderr b/tests/ui/parser/issues/issue-44406.stderr
index 1f0c1ea4c..de02ea85b 100644
--- a/tests/ui/parser/issues/issue-44406.stderr
+++ b/tests/ui/parser/issues/issue-44406.stderr
@@ -21,8 +21,8 @@ LL | foo!(true);
= note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
help: if `bar` is a struct, use braces as delimiters
|
-LL | bar { }
- | ~
+LL | bar { baz: $rest }
+ | ~ ~
help: if `bar` is a function, use the arguments directly
|
LL - bar(baz: $rest)
diff --git a/tests/ui/parser/issues/issue-58094-missing-right-square-bracket.rs b/tests/ui/parser/issues/issue-58094-missing-right-square-bracket.rs
index 25699f9fe..a596a9f2d 100644
--- a/tests/ui/parser/issues/issue-58094-missing-right-square-bracket.rs
+++ b/tests/ui/parser/issues/issue-58094-missing-right-square-bracket.rs
@@ -1,4 +1,5 @@
// Fixed in #66054.
// ignore-tidy-trailing-newlines
-// error-pattern: aborting due to 2 previous errors
+// error-pattern: this file contains an unclosed delimiter
+// error-pattern: aborting due to previous error
#[Ѕ \ No newline at end of file
diff --git a/tests/ui/parser/issues/issue-58094-missing-right-square-bracket.stderr b/tests/ui/parser/issues/issue-58094-missing-right-square-bracket.stderr
index 8a44ee761..c79e8b4fb 100644
--- a/tests/ui/parser/issues/issue-58094-missing-right-square-bracket.stderr
+++ b/tests/ui/parser/issues/issue-58094-missing-right-square-bracket.stderr
@@ -1,16 +1,10 @@
error: this file contains an unclosed delimiter
- --> $DIR/issue-58094-missing-right-square-bracket.rs:4:4
+ --> $DIR/issue-58094-missing-right-square-bracket.rs:5:4
|
LL | #[Ѕ
| - ^
| |
| unclosed delimiter
-error: expected item after attributes
- --> $DIR/issue-58094-missing-right-square-bracket.rs:4:1
- |
-LL | #[Ѕ
- | ^^^
-
-error: aborting due to 2 previous errors
+error: aborting due to previous error
diff --git a/tests/ui/parser/issues/issue-58856-1.rs b/tests/ui/parser/issues/issue-58856-1.rs
index ea80eb871..799243d54 100644
--- a/tests/ui/parser/issues/issue-58856-1.rs
+++ b/tests/ui/parser/issues/issue-58856-1.rs
@@ -1,8 +1,5 @@
impl A {
- //~^ ERROR cannot find type `A` in this scope
fn b(self>
- //~^ ERROR expected one of `)`, `,`, or `:`, found `>`
- //~| ERROR expected one of `->`, `where`, or `{`, found `>`
-}
+} //~ ERROR mismatched closing delimiter
fn main() {}
diff --git a/tests/ui/parser/issues/issue-58856-1.stderr b/tests/ui/parser/issues/issue-58856-1.stderr
index 96151f3fe..77ad8acbd 100644
--- a/tests/ui/parser/issues/issue-58856-1.stderr
+++ b/tests/ui/parser/issues/issue-58856-1.stderr
@@ -1,29 +1,12 @@
-error: expected one of `)`, `,`, or `:`, found `>`
- --> $DIR/issue-58856-1.rs:3:9
- |
-LL | fn b(self>
- | ^ ^ help: `)` may belong here
- | |
- | unclosed delimiter
-
-error: expected one of `->`, `where`, or `{`, found `>`
- --> $DIR/issue-58856-1.rs:3:14
+error: mismatched closing delimiter: `}`
+ --> $DIR/issue-58856-1.rs:2:9
|
LL | impl A {
- | - while parsing this item list starting here
-LL |
+ | - closing delimiter possibly meant for this
LL | fn b(self>
- | ^ expected one of `->`, `where`, or `{`
-...
+ | ^ unclosed delimiter
LL | }
- | - the item list ends here
-
-error[E0412]: cannot find type `A` in this scope
- --> $DIR/issue-58856-1.rs:1:6
- |
-LL | impl A {
- | ^ not found in this scope
+ | ^ mismatched closing delimiter
-error: aborting due to 3 previous errors
+error: aborting due to previous error
-For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/parser/issues/issue-58856-2.rs b/tests/ui/parser/issues/issue-58856-2.rs
index 9356d57b0..5edd72639 100644
--- a/tests/ui/parser/issues/issue-58856-2.rs
+++ b/tests/ui/parser/issues/issue-58856-2.rs
@@ -4,11 +4,8 @@ trait Howness {}
impl Howness for () {
fn how_are_you(&self -> Empty {
- //~^ ERROR expected one of `)` or `,`, found `->`
- //~| ERROR method `how_are_you` is not a member of trait `Howness`
Empty
}
-}
-//~^ ERROR non-item in item list
+} //~ ERROR mismatched closing delimiter
fn main() {}
diff --git a/tests/ui/parser/issues/issue-58856-2.stderr b/tests/ui/parser/issues/issue-58856-2.stderr
index 627dd3890..5fcf5bcc1 100644
--- a/tests/ui/parser/issues/issue-58856-2.stderr
+++ b/tests/ui/parser/issues/issue-58856-2.stderr
@@ -1,34 +1,13 @@
-error: expected one of `)` or `,`, found `->`
+error: mismatched closing delimiter: `}`
--> $DIR/issue-58856-2.rs:6:19
|
-LL | fn how_are_you(&self -> Empty {
- | ^ -^^
- | | |
- | | help: `)` may belong here
- | unclosed delimiter
-
-error: non-item in item list
- --> $DIR/issue-58856-2.rs:11:1
- |
LL | impl Howness for () {
- | - item list starts here
+ | - closing delimiter possibly meant for this
+LL | fn how_are_you(&self -> Empty {
+ | ^ unclosed delimiter
...
LL | }
- | ^
- | |
- | non-item starts here
- | item list ends here
-
-error[E0407]: method `how_are_you` is not a member of trait `Howness`
- --> $DIR/issue-58856-2.rs:6:5
- |
-LL | / fn how_are_you(&self -> Empty {
-LL | |
-LL | |
-LL | | Empty
-LL | | }
- | |_____^ not a member of trait `Howness`
+ | ^ mismatched closing delimiter
-error: aborting due to 3 previous errors
+error: aborting due to previous error
-For more information about this error, try `rustc --explain E0407`.
diff --git a/tests/ui/parser/issues/issue-60075.rs b/tests/ui/parser/issues/issue-60075.rs
index e89d78ee8..3c36e4d3e 100644
--- a/tests/ui/parser/issues/issue-60075.rs
+++ b/tests/ui/parser/issues/issue-60075.rs
@@ -3,9 +3,6 @@ fn main() {}
trait T {
fn qux() -> Option<usize> {
let _ = if true {
- });
-//~^ ERROR non-item in item list
-//~| ERROR mismatched closing delimiter: `)`
-//~| ERROR expected one of `.`, `;`
+ }); //~ ERROR mismatched closing delimiter
Some(4)
}
diff --git a/tests/ui/parser/issues/issue-60075.stderr b/tests/ui/parser/issues/issue-60075.stderr
index 210ef700c..cd8f1231f 100644
--- a/tests/ui/parser/issues/issue-60075.stderr
+++ b/tests/ui/parser/issues/issue-60075.stderr
@@ -1,21 +1,3 @@
-error: expected one of `.`, `;`, `?`, `else`, or an operator, found `}`
- --> $DIR/issue-60075.rs:6:10
- |
-LL | });
- | ^ expected one of `.`, `;`, `?`, `else`, or an operator
-
-error: non-item in item list
- --> $DIR/issue-60075.rs:6:11
- |
-LL | trait T {
- | - item list starts here
-...
-LL | });
- | ^ non-item starts here
-...
-LL | }
- | - item list ends here
-
error: mismatched closing delimiter: `)`
--> $DIR/issue-60075.rs:4:31
|
@@ -25,5 +7,5 @@ LL | let _ = if true {
LL | });
| ^ mismatched closing delimiter
-error: aborting due to 3 previous errors
+error: aborting due to previous error
diff --git a/tests/ui/parser/issues/issue-62524.rs b/tests/ui/parser/issues/issue-62524.rs
index 5259dfe2e..fa7c626f5 100644
--- a/tests/ui/parser/issues/issue-62524.rs
+++ b/tests/ui/parser/issues/issue-62524.rs
@@ -1,5 +1,5 @@
// ignore-tidy-trailing-newlines
-// error-pattern: aborting due to 3 previous errors
+// error-pattern: aborting due to previous error
#![allow(uncommon_codepoints)]
y![
diff --git a/tests/ui/parser/issues/issue-62524.stderr b/tests/ui/parser/issues/issue-62524.stderr
index 55eed0402..0cbaacd4c 100644
--- a/tests/ui/parser/issues/issue-62524.stderr
+++ b/tests/ui/parser/issues/issue-62524.stderr
@@ -6,28 +6,5 @@ LL | y![
LL | Ϥ,
| ^
-error: macros that expand to items must be delimited with braces or followed by a semicolon
- --> $DIR/issue-62524.rs:5:3
- |
-LL | y![
- | ___^
-LL | | Ϥ,
- | |__^
- |
-help: change the delimiters to curly braces
- |
-LL | y! { /* items */ }
- | ~~~~~~~~~~~~~~~
-help: add a semicolon
- |
-LL | Ϥ,;
- | +
-
-error: cannot find macro `y` in this scope
- --> $DIR/issue-62524.rs:5:1
- |
-LL | y![
- | ^
-
-error: aborting due to 3 previous errors
+error: aborting due to previous error
diff --git a/tests/ui/parser/issues/issue-62546.rs b/tests/ui/parser/issues/issue-62546.rs
index f06b65058..bb30d68ea 100644
--- a/tests/ui/parser/issues/issue-62546.rs
+++ b/tests/ui/parser/issues/issue-62546.rs
@@ -1,3 +1 @@
-pub t(#
-//~^ ERROR missing `fn` or `struct` for function or struct definition
-//~ ERROR this file contains an unclosed delimiter
+pub t(# //~ ERROR this file contains an unclosed delimiter
diff --git a/tests/ui/parser/issues/issue-62546.stderr b/tests/ui/parser/issues/issue-62546.stderr
index 32c61391e..80c1c7168 100644
--- a/tests/ui/parser/issues/issue-62546.stderr
+++ b/tests/ui/parser/issues/issue-62546.stderr
@@ -1,17 +1,8 @@
error: this file contains an unclosed delimiter
- --> $DIR/issue-62546.rs:3:52
+ --> $DIR/issue-62546.rs:1:60
|
LL | pub t(#
- | - unclosed delimiter
-LL |
-LL |
- | ^
+ | - unclosed delimiter ^
-error: missing `fn` or `struct` for function or struct definition
- --> $DIR/issue-62546.rs:1:4
- |
-LL | pub t(#
- | ---^- help: if you meant to call a macro, try: `t!`
-
-error: aborting due to 2 previous errors
+error: aborting due to previous error
diff --git a/tests/ui/parser/issues/issue-62554.rs b/tests/ui/parser/issues/issue-62554.rs
index cfd02183c..4b463a173 100644
--- a/tests/ui/parser/issues/issue-62554.rs
+++ b/tests/ui/parser/issues/issue-62554.rs
@@ -1,5 +1,4 @@
// error-pattern:this file contains an unclosed delimiter
-// error-pattern:xpected `{`, found `macro_rules`
fn main() {}
diff --git a/tests/ui/parser/issues/issue-62554.stderr b/tests/ui/parser/issues/issue-62554.stderr
index 9e62572e3..4637c795a 100644
--- a/tests/ui/parser/issues/issue-62554.stderr
+++ b/tests/ui/parser/issues/issue-62554.stderr
@@ -1,5 +1,5 @@
error: this file contains an unclosed delimiter
- --> $DIR/issue-62554.rs:6:89
+ --> $DIR/issue-62554.rs:5:89
|
LL | fn foo(u: u8) { if u8 macro_rules! u8 { (u6) => { fn uuuuuuuuuuu() { use s loo mod u8 {
| - - - - - ^
@@ -9,65 +9,5 @@ LL | fn foo(u: u8) { if u8 macro_rules! u8 { (u6) => { fn uuuuuuuuuuu() { use s
| | | unclosed delimiter
| unclosed delimiter unclosed delimiter
-error: this file contains an unclosed delimiter
- --> $DIR/issue-62554.rs:6:89
- |
-LL | fn foo(u: u8) { if u8 macro_rules! u8 { (u6) => { fn uuuuuuuuuuu() { use s loo mod u8 {
- | - - - - - ^
- | | | | | |
- | | | | | unclosed delimiter
- | | | | unclosed delimiter
- | | | unclosed delimiter
- | unclosed delimiter unclosed delimiter
-
-error: this file contains an unclosed delimiter
- --> $DIR/issue-62554.rs:6:89
- |
-LL | fn foo(u: u8) { if u8 macro_rules! u8 { (u6) => { fn uuuuuuuuuuu() { use s loo mod u8 {
- | - - - - - ^
- | | | | | |
- | | | | | unclosed delimiter
- | | | | unclosed delimiter
- | | | unclosed delimiter
- | unclosed delimiter unclosed delimiter
-
-error: this file contains an unclosed delimiter
- --> $DIR/issue-62554.rs:6:89
- |
-LL | fn foo(u: u8) { if u8 macro_rules! u8 { (u6) => { fn uuuuuuuuuuu() { use s loo mod u8 {
- | - - - - - ^
- | | | | | |
- | | | | | unclosed delimiter
- | | | | unclosed delimiter
- | | | unclosed delimiter
- | unclosed delimiter unclosed delimiter
-
-error: this file contains an unclosed delimiter
- --> $DIR/issue-62554.rs:6:89
- |
-LL | fn foo(u: u8) { if u8 macro_rules! u8 { (u6) => { fn uuuuuuuuuuu() { use s loo mod u8 {
- | - - - - - ^
- | | | | | |
- | | | | | unclosed delimiter
- | | | | unclosed delimiter
- | | | unclosed delimiter
- | unclosed delimiter unclosed delimiter
-
-error: expected `{`, found `macro_rules`
- --> $DIR/issue-62554.rs:6:23
- |
-LL | fn foo(u: u8) { if u8 macro_rules! u8 { (u6) => { fn uuuuuuuuuuu() { use s loo mod u8 {
- | ^^^^^^^^^^^ expected `{`
- |
-note: the `if` expression is missing a block after this condition
- --> $DIR/issue-62554.rs:6:20
- |
-LL | fn foo(u: u8) { if u8 macro_rules! u8 { (u6) => { fn uuuuuuuuuuu() { use s loo mod u8 {
- | ^^
-help: try placing this code inside a block
- |
-LL | fn foo(u: u8) { if u8 { macro_rules! u8 { (u6) => { fn uuuuuuuuuuu() { use s loo mod u8 { }
- | + +
-
-error: aborting due to 6 previous errors
+error: aborting due to previous error
diff --git a/tests/ui/parser/issues/issue-62881.rs b/tests/ui/parser/issues/issue-62881.rs
index b9204595f..cc80d4499 100644
--- a/tests/ui/parser/issues/issue-62881.rs
+++ b/tests/ui/parser/issues/issue-62881.rs
@@ -1,6 +1,3 @@
fn main() {}
-fn f() -> isize { fn f() -> isize {} pub f<
-//~^ ERROR missing `fn` or `struct` for function or struct definition
-//~| ERROR mismatched types
-//~ ERROR this file contains an unclosed delimiter
+fn f() -> isize { fn f() -> isize {} pub f< //~ ERROR this file contains an unclosed delimiter
diff --git a/tests/ui/parser/issues/issue-62881.stderr b/tests/ui/parser/issues/issue-62881.stderr
index 87be69baa..e57cbd181 100644
--- a/tests/ui/parser/issues/issue-62881.stderr
+++ b/tests/ui/parser/issues/issue-62881.stderr
@@ -1,26 +1,8 @@
error: this file contains an unclosed delimiter
- --> $DIR/issue-62881.rs:6:52
+ --> $DIR/issue-62881.rs:3:96
|
LL | fn f() -> isize { fn f() -> isize {} pub f<
- | - unclosed delimiter
-...
-LL |
- | ^
+ | - unclosed delimiter ^
-error: missing `fn` or `struct` for function or struct definition
- --> $DIR/issue-62881.rs:3:41
- |
-LL | fn f() -> isize { fn f() -> isize {} pub f<
- | ^
-
-error[E0308]: mismatched types
- --> $DIR/issue-62881.rs:3:29
- |
-LL | fn f() -> isize { fn f() -> isize {} pub f<
- | - ^^^^^ expected `isize`, found `()`
- | |
- | implicitly returns `()` as its body has no tail or `return` expression
-
-error: aborting due to 3 previous errors
+error: aborting due to previous error
-For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/parser/issues/issue-62894.rs b/tests/ui/parser/issues/issue-62894.rs
index b9c0bf834..4dfa406ea 100644
--- a/tests/ui/parser/issues/issue-62894.rs
+++ b/tests/ui/parser/issues/issue-62894.rs
@@ -1,6 +1,5 @@
// Regression test for #62894, shouldn't crash.
// error-pattern: this file contains an unclosed delimiter
-// error-pattern: expected one of `(`, `[`, or `{`, found keyword `fn`
fn f() { assert_eq!(f(), (), assert_eq!(assert_eq!
diff --git a/tests/ui/parser/issues/issue-62894.stderr b/tests/ui/parser/issues/issue-62894.stderr
index 07a203bf4..700479076 100644
--- a/tests/ui/parser/issues/issue-62894.stderr
+++ b/tests/ui/parser/issues/issue-62894.stderr
@@ -1,5 +1,5 @@
error: this file contains an unclosed delimiter
- --> $DIR/issue-62894.rs:7:14
+ --> $DIR/issue-62894.rs:6:14
|
LL | fn f() { assert_eq!(f(), (), assert_eq!(assert_eq!
| - - - unclosed delimiter
@@ -10,41 +10,5 @@ LL |
LL | fn main() {}
| ^
-error: this file contains an unclosed delimiter
- --> $DIR/issue-62894.rs:7:14
- |
-LL | fn f() { assert_eq!(f(), (), assert_eq!(assert_eq!
- | - - - unclosed delimiter
- | | |
- | | unclosed delimiter
- | unclosed delimiter
-LL |
-LL | fn main() {}
- | ^
-
-error: this file contains an unclosed delimiter
- --> $DIR/issue-62894.rs:7:14
- |
-LL | fn f() { assert_eq!(f(), (), assert_eq!(assert_eq!
- | - - - unclosed delimiter
- | | |
- | | unclosed delimiter
- | unclosed delimiter
-LL |
-LL | fn main() {}
- | ^
-
-error: expected one of `(`, `[`, or `{`, found keyword `fn`
- --> $DIR/issue-62894.rs:7:1
- |
-LL | fn f() { assert_eq!(f(), (), assert_eq!(assert_eq!
- | - expected one of `(`, `[`, or `{`
-LL |
-LL | fn main() {}
- | ^^ unexpected token
- --> $SRC_DIR/core/src/macros/mod.rs:LL:COL
- |
- = note: while parsing argument for this `expr` macro fragment
-
-error: aborting due to 4 previous errors
+error: aborting due to previous error
diff --git a/tests/ui/parser/issues/issue-62895.rs b/tests/ui/parser/issues/issue-62895.rs
index 53f17405d..33511dee9 100644
--- a/tests/ui/parser/issues/issue-62895.rs
+++ b/tests/ui/parser/issues/issue-62895.rs
@@ -1,11 +1,11 @@
fn main() {}
-fn v() -> isize { //~ ERROR mismatched types
-mod _ { //~ ERROR expected identifier
-pub fn g() -> isizee { //~ ERROR cannot find type `isizee` in this scope
-mod _ { //~ ERROR expected identifier
-pub g() -> is //~ ERROR missing `fn` for function definition
-(), w20);
+fn v() -> isize {
+mod _ {
+pub fn g() -> isizee {
+mod _ {
+pub g() -> is
+(), w20); //~ ERROR mismatched closing delimiter
}
-(), w20); //~ ERROR expected item, found `;`
+(), w20); //~ ERROR mismatched closing delimiter
}
diff --git a/tests/ui/parser/issues/issue-62895.stderr b/tests/ui/parser/issues/issue-62895.stderr
index 2e7e500f4..0ad9ac63e 100644
--- a/tests/ui/parser/issues/issue-62895.stderr
+++ b/tests/ui/parser/issues/issue-62895.stderr
@@ -1,47 +1,20 @@
-error: expected identifier, found reserved identifier `_`
- --> $DIR/issue-62895.rs:4:5
+error: mismatched closing delimiter: `)`
+ --> $DIR/issue-62895.rs:6:7
|
LL | mod _ {
- | ^ expected identifier, found reserved identifier
-
-error: expected identifier, found reserved identifier `_`
- --> $DIR/issue-62895.rs:6:5
- |
-LL | mod _ {
- | ^ expected identifier, found reserved identifier
-
-error: missing `fn` for function definition
- --> $DIR/issue-62895.rs:7:4
- |
+ | ^ unclosed delimiter
LL | pub g() -> is
- | ^^^^
- |
-help: add `fn` here to parse `g` as a public function
- |
-LL | pub fn g() -> is
- | ++
-
-error: expected item, found `;`
- --> $DIR/issue-62895.rs:10:9
- |
LL | (), w20);
- | ^ help: remove this semicolon
-
-error[E0412]: cannot find type `isizee` in this scope
- --> $DIR/issue-62895.rs:5:15
- |
-LL | pub fn g() -> isizee {
- | ^^^^^^ help: a builtin type with a similar name exists: `isize`
+ | ^ mismatched closing delimiter
-error[E0308]: mismatched types
- --> $DIR/issue-62895.rs:3:11
+error: mismatched closing delimiter: `)`
+ --> $DIR/issue-62895.rs:4:7
|
-LL | fn v() -> isize {
- | - ^^^^^ expected `isize`, found `()`
- | |
- | implicitly returns `()` as its body has no tail or `return` expression
+LL | mod _ {
+ | ^ unclosed delimiter
+...
+LL | (), w20);
+ | ^ mismatched closing delimiter
-error: aborting due to 6 previous errors
+error: aborting due to 2 previous errors
-Some errors have detailed explanations: E0308, E0412.
-For more information about an error, try `rustc --explain E0308`.
diff --git a/tests/ui/parser/issues/issue-62973.rs b/tests/ui/parser/issues/issue-62973.rs
index 1c5d0c6f8..22d754577 100644
--- a/tests/ui/parser/issues/issue-62973.rs
+++ b/tests/ui/parser/issues/issue-62973.rs
@@ -1,5 +1,5 @@
// ignore-tidy-trailing-newlines
-// error-pattern: aborting due to 7 previous errors
+// error-pattern: aborting due to 3 previous errors
fn main() {}
diff --git a/tests/ui/parser/issues/issue-62973.stderr b/tests/ui/parser/issues/issue-62973.stderr
index 4737bc718..14411a8cb 100644
--- a/tests/ui/parser/issues/issue-62973.stderr
+++ b/tests/ui/parser/issues/issue-62973.stderr
@@ -1,68 +1,3 @@
-error: this file contains an unclosed delimiter
- --> $DIR/issue-62973.rs:8:2
- |
-LL | fn p() { match s { v, E { [) {) }
- | - - unclosed delimiter
- | |
- | unclosed delimiter
-LL |
-LL |
- | ^
-
-error: this file contains an unclosed delimiter
- --> $DIR/issue-62973.rs:8:2
- |
-LL | fn p() { match s { v, E { [) {) }
- | - - unclosed delimiter
- | |
- | unclosed delimiter
-LL |
-LL |
- | ^
-
-error: expected one of `,`, `:`, or `}`, found `{`
- --> $DIR/issue-62973.rs:6:8
- |
-LL | fn p() { match s { v, E { [) {) }
- | ^ - ^ expected one of `,`, `:`, or `}`
- | | |
- | | while parsing this struct
- | unclosed delimiter
- |
-help: `}` may belong here
- |
-LL | fn p() { match s { v, E} { [) {) }
- | +
-help: try naming a field
- |
-LL | fn p() { match s { v, E: E { [) {) }
- | ++
-
-error: struct literals are not allowed here
- --> $DIR/issue-62973.rs:6:16
- |
-LL | fn p() { match s { v, E { [) {) }
- | ________________^
-LL | |
-LL | |
- | |_^
- |
-help: surround the struct literal with parentheses
- |
-LL ~ fn p() { match (s { v, E { [) {) }
-LL |
-LL ~ )
- |
-
-error: expected one of `.`, `?`, `{`, or an operator, found `}`
- --> $DIR/issue-62973.rs:8:2
- |
-LL | fn p() { match s { v, E { [) {) }
- | ----- while parsing this `match` expression
-LL |
-LL |
- | ^ expected one of `.`, `?`, `{`, or an operator
-
error: mismatched closing delimiter: `)`
--> $DIR/issue-62973.rs:6:27
|
@@ -79,5 +14,18 @@ LL | fn p() { match s { v, E { [) {) }
| |
| unclosed delimiter
-error: aborting due to 7 previous errors
+error: this file contains an unclosed delimiter
+ --> $DIR/issue-62973.rs:8:2
+ |
+LL | fn p() { match s { v, E { [) {) }
+ | - - - - missing open `(` for this delimiter
+ | | | |
+ | | | missing open `(` for this delimiter
+ | | unclosed delimiter
+ | unclosed delimiter
+LL |
+LL |
+ | ^
+
+error: aborting due to 3 previous errors
diff --git a/tests/ui/parser/issues/issue-63116.rs b/tests/ui/parser/issues/issue-63116.rs
index 430bc1d71..6b9d9cdbe 100644
--- a/tests/ui/parser/issues/issue-63116.rs
+++ b/tests/ui/parser/issues/issue-63116.rs
@@ -1,3 +1,3 @@
// fixed by #66361
-// error-pattern: aborting due to 3 previous errors
+// error-pattern: aborting due to 2 previous errors
impl W <s(f;Y(;]
diff --git a/tests/ui/parser/issues/issue-63116.stderr b/tests/ui/parser/issues/issue-63116.stderr
index cfdd99d14..27c94f337 100644
--- a/tests/ui/parser/issues/issue-63116.stderr
+++ b/tests/ui/parser/issues/issue-63116.stderr
@@ -1,17 +1,3 @@
-error: this file contains an unclosed delimiter
- --> $DIR/issue-63116.rs:3:18
- |
-LL | impl W <s(f;Y(;]
- | - ^
- | |
- | unclosed delimiter
-
-error: expected one of `!`, `(`, `)`, `+`, `,`, `::`, or `<`, found `;`
- --> $DIR/issue-63116.rs:3:12
- |
-LL | impl W <s(f;Y(;]
- | ^ expected one of 7 possible tokens
-
error: mismatched closing delimiter: `]`
--> $DIR/issue-63116.rs:3:14
|
@@ -20,5 +6,14 @@ LL | impl W <s(f;Y(;]
| |
| unclosed delimiter
-error: aborting due to 3 previous errors
+error: this file contains an unclosed delimiter
+ --> $DIR/issue-63116.rs:3:18
+ |
+LL | impl W <s(f;Y(;]
+ | - - ^
+ | | |
+ | | missing open `[` for this delimiter
+ | unclosed delimiter
+
+error: aborting due to 2 previous errors
diff --git a/tests/ui/parser/issues/issue-63135.rs b/tests/ui/parser/issues/issue-63135.rs
index a5a8de854..d61197dc5 100644
--- a/tests/ui/parser/issues/issue-63135.rs
+++ b/tests/ui/parser/issues/issue-63135.rs
@@ -1,3 +1,3 @@
-// error-pattern: aborting due to 5 previous errors
-
+// error-pattern: this file contains an unclosed delimiter
+// error-pattern: aborting due to previous error
fn i(n{...,f #
diff --git a/tests/ui/parser/issues/issue-63135.stderr b/tests/ui/parser/issues/issue-63135.stderr
index 80e9ac5be..ff9d99c28 100644
--- a/tests/ui/parser/issues/issue-63135.stderr
+++ b/tests/ui/parser/issues/issue-63135.stderr
@@ -7,37 +7,5 @@ LL | fn i(n{...,f #
| | unclosed delimiter
| unclosed delimiter
-error: this file contains an unclosed delimiter
- --> $DIR/issue-63135.rs:3:16
- |
-LL | fn i(n{...,f #
- | - - ^
- | | |
- | | unclosed delimiter
- | unclosed delimiter
-
-error: expected field pattern, found `...`
- --> $DIR/issue-63135.rs:3:8
- |
-LL | fn i(n{...,f #
- | ^^^ help: to omit remaining fields, use one fewer `.`: `..`
-
-error: expected `}`, found `,`
- --> $DIR/issue-63135.rs:3:11
- |
-LL | fn i(n{...,f #
- | ---^
- | | |
- | | expected `}`
- | `..` must be at the end and cannot have a trailing comma
-
-error: expected one of `!` or `[`, found `}`
- --> $DIR/issue-63135.rs:3:16
- |
-LL | fn i(n{...,f #
- | - ^ expected one of `!` or `[`
- | |
- | while parsing the fields for this pattern
-
-error: aborting due to 5 previous errors
+error: aborting due to previous error
diff --git a/tests/ui/parser/issues/issue-66357-unexpected-unreachable.rs b/tests/ui/parser/issues/issue-66357-unexpected-unreachable.rs
index aed428bfc..69a2dfe6c 100644
--- a/tests/ui/parser/issues/issue-66357-unexpected-unreachable.rs
+++ b/tests/ui/parser/issues/issue-66357-unexpected-unreachable.rs
@@ -9,6 +9,4 @@
//
// ended up bubbling up `Ok(true)` to `unexpected` which then used `unreachable!()`.
-fn f() { |[](* }
-//~^ ERROR expected one of `,` or `:`, found `(`
-//~| ERROR expected one of `&`, `(`, `)`, `-`, `...`, `..=`, `..`, `[`, `_`, `box`, `mut`, `ref`, `|`, identifier, or path, found `*`
+fn f() { |[](* } //~ ERROR mismatched closing delimiter
diff --git a/tests/ui/parser/issues/issue-66357-unexpected-unreachable.stderr b/tests/ui/parser/issues/issue-66357-unexpected-unreachable.stderr
index 6cbab855c..079fff37e 100644
--- a/tests/ui/parser/issues/issue-66357-unexpected-unreachable.stderr
+++ b/tests/ui/parser/issues/issue-66357-unexpected-unreachable.stderr
@@ -1,16 +1,11 @@
-error: expected one of `,` or `:`, found `(`
+error: mismatched closing delimiter: `}`
--> $DIR/issue-66357-unexpected-unreachable.rs:12:13
|
LL | fn f() { |[](* }
- | ^ expected one of `,` or `:`
+ | - ^ ^ mismatched closing delimiter
+ | | |
+ | | unclosed delimiter
+ | closing delimiter possibly meant for this
-error: expected one of `&`, `(`, `)`, `-`, `...`, `..=`, `..`, `[`, `_`, `box`, `mut`, `ref`, `|`, identifier, or path, found `*`
- --> $DIR/issue-66357-unexpected-unreachable.rs:12:13
- |
-LL | fn f() { |[](* }
- | ^^ help: `)` may belong here
- | |
- | unclosed delimiter
-
-error: aborting due to 2 previous errors
+error: aborting due to previous error
diff --git a/tests/ui/parser/issues/issue-67377-invalid-syntax-in-enum-discriminant.rs b/tests/ui/parser/issues/issue-67377-invalid-syntax-in-enum-discriminant.rs
index 87222ef4b..e712160fc 100644
--- a/tests/ui/parser/issues/issue-67377-invalid-syntax-in-enum-discriminant.rs
+++ b/tests/ui/parser/issues/issue-67377-invalid-syntax-in-enum-discriminant.rs
@@ -4,9 +4,6 @@ mod a {
enum Bug {
V = [PhantomData; { [ () ].len() ].len() as isize,
//~^ ERROR mismatched closing delimiter: `]`
- //~| ERROR mismatched closing delimiter: `]`
- //~| ERROR mismatched closing delimiter: `]`
- //~| ERROR mismatched closing delimiter: `]`
}
}
@@ -14,10 +11,6 @@ mod b {
enum Bug {
V = [Vec::new; { [].len() ].len() as isize,
//~^ ERROR mismatched closing delimiter: `]`
- //~| ERROR mismatched closing delimiter: `]`
- //~| ERROR mismatched closing delimiter: `]`
- //~| ERROR mismatched closing delimiter: `]`
- //~| ERROR type annotations needed
}
}
@@ -25,11 +18,6 @@ mod c {
enum Bug {
V = [Vec::new; { [0].len() ].len() as isize,
//~^ ERROR mismatched closing delimiter: `]`
- //~| ERROR mismatched closing delimiter: `]`
- //~| ERROR mismatched closing delimiter: `]`
- //~| ERROR mismatched closing delimiter: `]`
- //~| ERROR type annotations needed
- }
}
-fn main() {}
+fn main() {} //~ ERROR this file contains an unclosed delimiter
diff --git a/tests/ui/parser/issues/issue-67377-invalid-syntax-in-enum-discriminant.stderr b/tests/ui/parser/issues/issue-67377-invalid-syntax-in-enum-discriminant.stderr
index a00f37ed6..9f631edf6 100644
--- a/tests/ui/parser/issues/issue-67377-invalid-syntax-in-enum-discriminant.stderr
+++ b/tests/ui/parser/issues/issue-67377-invalid-syntax-in-enum-discriminant.stderr
@@ -8,7 +8,7 @@ LL | V = [PhantomData; { [ () ].len() ].len() as isize,
| closing delimiter possibly meant for this
error: mismatched closing delimiter: `]`
- --> $DIR/issue-67377-invalid-syntax-in-enum-discriminant.rs:15:24
+ --> $DIR/issue-67377-invalid-syntax-in-enum-discriminant.rs:12:24
|
LL | V = [Vec::new; { [].len() ].len() as isize,
| - ^ ^ mismatched closing delimiter
@@ -17,7 +17,7 @@ LL | V = [Vec::new; { [].len() ].len() as isize,
| closing delimiter possibly meant for this
error: mismatched closing delimiter: `]`
- --> $DIR/issue-67377-invalid-syntax-in-enum-discriminant.rs:26:24
+ --> $DIR/issue-67377-invalid-syntax-in-enum-discriminant.rs:19:24
|
LL | V = [Vec::new; { [0].len() ].len() as isize,
| - ^ ^ mismatched closing delimiter
@@ -25,104 +25,23 @@ LL | V = [Vec::new; { [0].len() ].len() as isize,
| | unclosed delimiter
| closing delimiter possibly meant for this
-error: mismatched closing delimiter: `]`
- --> $DIR/issue-67377-invalid-syntax-in-enum-discriminant.rs:5:27
- |
-LL | V = [PhantomData; { [ () ].len() ].len() as isize,
- | - ^ ^ mismatched closing delimiter
- | | |
- | | unclosed delimiter
- | closing delimiter possibly meant for this
-
-error: mismatched closing delimiter: `]`
- --> $DIR/issue-67377-invalid-syntax-in-enum-discriminant.rs:15:24
- |
-LL | V = [Vec::new; { [].len() ].len() as isize,
- | - ^ ^ mismatched closing delimiter
- | | |
- | | unclosed delimiter
- | closing delimiter possibly meant for this
-
-error: mismatched closing delimiter: `]`
- --> $DIR/issue-67377-invalid-syntax-in-enum-discriminant.rs:26:24
- |
-LL | V = [Vec::new; { [0].len() ].len() as isize,
- | - ^ ^ mismatched closing delimiter
- | | |
- | | unclosed delimiter
- | closing delimiter possibly meant for this
-
-error: mismatched closing delimiter: `]`
- --> $DIR/issue-67377-invalid-syntax-in-enum-discriminant.rs:5:27
- |
-LL | V = [PhantomData; { [ () ].len() ].len() as isize,
- | - ^ ^ mismatched closing delimiter
- | | |
- | | unclosed delimiter
- | closing delimiter possibly meant for this
-
-error: mismatched closing delimiter: `]`
- --> $DIR/issue-67377-invalid-syntax-in-enum-discriminant.rs:15:24
- |
-LL | V = [Vec::new; { [].len() ].len() as isize,
- | - ^ ^ mismatched closing delimiter
- | | |
- | | unclosed delimiter
- | closing delimiter possibly meant for this
-
-error: mismatched closing delimiter: `]`
- --> $DIR/issue-67377-invalid-syntax-in-enum-discriminant.rs:26:24
- |
-LL | V = [Vec::new; { [0].len() ].len() as isize,
- | - ^ ^ mismatched closing delimiter
- | | |
- | | unclosed delimiter
- | closing delimiter possibly meant for this
-
-error: mismatched closing delimiter: `]`
- --> $DIR/issue-67377-invalid-syntax-in-enum-discriminant.rs:5:27
+error: this file contains an unclosed delimiter
+ --> $DIR/issue-67377-invalid-syntax-in-enum-discriminant.rs:23:65
|
LL | V = [PhantomData; { [ () ].len() ].len() as isize,
- | - ^ ^ mismatched closing delimiter
- | | |
- | | unclosed delimiter
- | closing delimiter possibly meant for this
-
-error: mismatched closing delimiter: `]`
- --> $DIR/issue-67377-invalid-syntax-in-enum-discriminant.rs:15:24
- |
+ | - missing open `[` for this delimiter
+...
LL | V = [Vec::new; { [].len() ].len() as isize,
- | - ^ ^ mismatched closing delimiter
- | | |
- | | unclosed delimiter
- | closing delimiter possibly meant for this
-
-error: mismatched closing delimiter: `]`
- --> $DIR/issue-67377-invalid-syntax-in-enum-discriminant.rs:26:24
- |
+ | - missing open `[` for this delimiter
+...
+LL | mod c {
+ | - unclosed delimiter
+LL | enum Bug {
LL | V = [Vec::new; { [0].len() ].len() as isize,
- | - ^ ^ mismatched closing delimiter
- | | |
- | | unclosed delimiter
- | closing delimiter possibly meant for this
-
-error[E0282]: type annotations needed
- --> $DIR/issue-67377-invalid-syntax-in-enum-discriminant.rs:15:26
- |
-LL | V = [Vec::new; { [].len() ].len() as isize,
- | ^^ cannot infer type for type parameter `T`
-
-error[E0282]: type annotations needed
- --> $DIR/issue-67377-invalid-syntax-in-enum-discriminant.rs:26:14
- |
-LL | V = [Vec::new; { [0].len() ].len() as isize,
- | ^^^^^^^^ cannot infer type of the type parameter `T` declared on the struct `Vec`
- |
-help: consider specifying the generic argument
- |
-LL | V = [Vec::<T>::new; { [0].len() ].len() as isize,
- | +++++
+ | - missing open `[` for this delimiter
+...
+LL | fn main() {}
+ | ^
-error: aborting due to 14 previous errors
+error: aborting due to 4 previous errors
-For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/parser/issues/issue-68629.rs b/tests/ui/parser/issues/issue-68629.rs
index 672a31f12..af89bb586 100644
--- a/tests/ui/parser/issues/issue-68629.rs
+++ b/tests/ui/parser/issues/issue-68629.rs
Binary files differ
diff --git a/tests/ui/parser/issues/issue-68629.stderr b/tests/ui/parser/issues/issue-68629.stderr
index 43a903e6c..2562baa1c 100644
--- a/tests/ui/parser/issues/issue-68629.stderr
+++ b/tests/ui/parser/issues/issue-68629.stderr
Binary files differ
diff --git a/tests/ui/parser/issues/issue-69259.rs b/tests/ui/parser/issues/issue-69259.rs
new file mode 100644
index 000000000..01fc2c085
--- /dev/null
+++ b/tests/ui/parser/issues/issue-69259.rs
@@ -0,0 +1,3 @@
+fn main() {}
+
+fn f) {} //~ ERROR unexpected closing delimiter
diff --git a/tests/ui/parser/issues/issue-69259.stderr b/tests/ui/parser/issues/issue-69259.stderr
new file mode 100644
index 000000000..604b7de33
--- /dev/null
+++ b/tests/ui/parser/issues/issue-69259.stderr
@@ -0,0 +1,8 @@
+error: unexpected closing delimiter: `)`
+ --> $DIR/issue-69259.rs:3:5
+ |
+LL | fn f) {}
+ | ^ unexpected closing delimiter
+
+error: aborting due to previous error
+
diff --git a/tests/ui/parser/issues/issue-70583-block-is-empty-1.stderr b/tests/ui/parser/issues/issue-70583-block-is-empty-1.stderr
index 39bf113ef..46cbb056d 100644
--- a/tests/ui/parser/issues/issue-70583-block-is-empty-1.stderr
+++ b/tests/ui/parser/issues/issue-70583-block-is-empty-1.stderr
@@ -2,10 +2,10 @@ error: unexpected closing delimiter: `}`
--> $DIR/issue-70583-block-is-empty-1.rs:20:1
|
LL | fn struct_generic(x: Vec<i32>) {
- | - this opening brace...
+ | - this delimiter might not be properly closed...
...
LL | }
- | - ...matches this closing brace
+ | - ...as it matches this but it has different indentation
LL | }
| ^ unexpected closing delimiter
diff --git a/tests/ui/parser/issues/issue-70583-block-is-empty-2.stderr b/tests/ui/parser/issues/issue-70583-block-is-empty-2.stderr
index 5d37b2164..9ae94c701 100644
--- a/tests/ui/parser/issues/issue-70583-block-is-empty-2.stderr
+++ b/tests/ui/parser/issues/issue-70583-block-is-empty-2.stderr
@@ -1,8 +1,12 @@
error: unexpected closing delimiter: `}`
--> $DIR/issue-70583-block-is-empty-2.rs:14:1
|
+LL | match self {
+ | - this delimiter might not be properly closed...
LL | ErrorHandled::Reported => {}}
- | -- block is empty, you might have not meant to close it
+ | --- ...as it matches this but it has different indentation
+ | |
+ | block is empty, you might have not meant to close it
...
LL | }
| ^ unexpected closing delimiter
diff --git a/tests/ui/parser/issues/issue-84104.rs b/tests/ui/parser/issues/issue-84104.rs
index 998949b94..962eb69bd 100644
--- a/tests/ui/parser/issues/issue-84104.rs
+++ b/tests/ui/parser/issues/issue-84104.rs
@@ -1,3 +1,2 @@
// error-pattern: this file contains an unclosed delimiter
-// error-pattern: expected one of
#[i=i::<ښܖ<
diff --git a/tests/ui/parser/issues/issue-84104.stderr b/tests/ui/parser/issues/issue-84104.stderr
index aff31f2c9..7ad59f845 100644
--- a/tests/ui/parser/issues/issue-84104.stderr
+++ b/tests/ui/parser/issues/issue-84104.stderr
@@ -1,16 +1,10 @@
error: this file contains an unclosed delimiter
- --> $DIR/issue-84104.rs:3:13
+ --> $DIR/issue-84104.rs:2:13
|
LL | #[i=i::<ښܖ<
| - ^
| |
| unclosed delimiter
-error: expected one of `>`, a const expression, lifetime, or type, found `]`
- --> $DIR/issue-84104.rs:3:13
- |
-LL | #[i=i::<ښܖ<
- | ^ expected one of `>`, a const expression, lifetime, or type
-
-error: aborting due to 2 previous errors
+error: aborting due to previous error
diff --git a/tests/ui/parser/issues/issue-84148-2.rs b/tests/ui/parser/issues/issue-84148-2.rs
index 2f6a7facf..e677abde5 100644
--- a/tests/ui/parser/issues/issue-84148-2.rs
+++ b/tests/ui/parser/issues/issue-84148-2.rs
@@ -1,3 +1,2 @@
// error-pattern: this file contains an unclosed delimiter
-// error-pattern: invalid `?` in type
fn f(t:for<>t?
diff --git a/tests/ui/parser/issues/issue-84148-2.stderr b/tests/ui/parser/issues/issue-84148-2.stderr
index 71d543f9b..20761180e 100644
--- a/tests/ui/parser/issues/issue-84148-2.stderr
+++ b/tests/ui/parser/issues/issue-84148-2.stderr
@@ -1,27 +1,10 @@
error: this file contains an unclosed delimiter
- --> $DIR/issue-84148-2.rs:3:16
+ --> $DIR/issue-84148-2.rs:2:16
|
LL | fn f(t:for<>t?
| - ^
| |
| unclosed delimiter
-error: invalid `?` in type
- --> $DIR/issue-84148-2.rs:3:14
- |
-LL | fn f(t:for<>t?
- | ^ `?` is only allowed on expressions, not types
- |
-help: if you meant to express that the type might not contain a value, use the `Option` wrapper type
- |
-LL | fn f(t:Option<for<>t>
- | +++++++ ~
-
-error: expected one of `->`, `where`, or `{`, found `<eof>`
- --> $DIR/issue-84148-2.rs:3:16
- |
-LL | fn f(t:for<>t?
- | ^ expected one of `->`, `where`, or `{`
-
-error: aborting due to 3 previous errors
+error: aborting due to previous error
diff --git a/tests/ui/parser/issues/issue-87086-colon-path-sep.rs b/tests/ui/parser/issues/issue-87086-colon-path-sep.rs
index 0b7b67496..e1ea38f27 100644
--- a/tests/ui/parser/issues/issue-87086-colon-path-sep.rs
+++ b/tests/ui/parser/issues/issue-87086-colon-path-sep.rs
@@ -68,7 +68,6 @@ fn main() {
Foo:Bar::Baz => {}
//~^ ERROR: expected one of
//~| HELP: maybe write a path separator here
- //~| ERROR: failed to resolve: `Bar` is a variant, not a module
}
match myfoo {
Foo::Bar => {}
diff --git a/tests/ui/parser/issues/issue-87086-colon-path-sep.stderr b/tests/ui/parser/issues/issue-87086-colon-path-sep.stderr
index 2050a16be..63b072ac4 100644
--- a/tests/ui/parser/issues/issue-87086-colon-path-sep.stderr
+++ b/tests/ui/parser/issues/issue-87086-colon-path-sep.stderr
@@ -2,89 +2,118 @@ error: expected one of `@` or `|`, found `:`
--> $DIR/issue-87086-colon-path-sep.rs:17:12
|
LL | Foo:Bar => {}
- | ^
+ | ^--- specifying the type of a pattern isn't supported
| |
| expected one of `@` or `|`
- | help: maybe write a path separator here: `::`
+ |
+help: maybe write a path separator here
+ |
+LL | Foo::Bar => {}
+ | ~~
error: expected one of `!`, `(`, `...`, `..=`, `..`, `::`, `{`, or `|`, found `:`
--> $DIR/issue-87086-colon-path-sep.rs:23:17
|
LL | qux::Foo:Bar => {}
- | ^
+ | ^--- specifying the type of a pattern isn't supported
| |
| expected one of 8 possible tokens
- | help: maybe write a path separator here: `::`
+ |
+help: maybe write a path separator here
+ |
+LL | qux::Foo::Bar => {}
+ | ~~
error: expected one of `@` or `|`, found `:`
--> $DIR/issue-87086-colon-path-sep.rs:29:12
|
LL | qux:Foo::Baz => {}
- | ^
+ | ^-------- specifying the type of a pattern isn't supported
| |
| expected one of `@` or `|`
- | help: maybe write a path separator here: `::`
+ |
+help: maybe write a path separator here
+ |
+LL | qux::Foo::Baz => {}
+ | ~~
error: expected one of `@` or `|`, found `:`
--> $DIR/issue-87086-colon-path-sep.rs:35:12
|
LL | qux: Foo::Baz if true => {}
- | ^
+ | ^ -------- specifying the type of a pattern isn't supported
| |
| expected one of `@` or `|`
- | help: maybe write a path separator here: `::`
+ |
+help: maybe write a path separator here
+ |
+LL | qux::Foo::Baz if true => {}
+ | ~~
error: expected one of `@` or `|`, found `:`
--> $DIR/issue-87086-colon-path-sep.rs:40:15
|
LL | if let Foo:Bar = f() {
- | ^
+ | ^--- specifying the type of a pattern isn't supported
| |
| expected one of `@` or `|`
- | help: maybe write a path separator here: `::`
+ |
+help: maybe write a path separator here
+ |
+LL | if let Foo::Bar = f() {
+ | ~~
error: expected one of `@` or `|`, found `:`
--> $DIR/issue-87086-colon-path-sep.rs:48:16
|
LL | ref qux: Foo::Baz => {}
- | ^
+ | ^ -------- specifying the type of a pattern isn't supported
| |
| expected one of `@` or `|`
- | help: maybe write a path separator here: `::`
+ |
+help: maybe write a path separator here
+ |
+LL | ref qux::Foo::Baz => {}
+ | ~~
error: expected one of `@` or `|`, found `:`
--> $DIR/issue-87086-colon-path-sep.rs:57:16
|
LL | mut qux: Foo::Baz => {}
- | ^
+ | ^ -------- specifying the type of a pattern isn't supported
| |
| expected one of `@` or `|`
- | help: maybe write a path separator here: `::`
+ |
+help: maybe write a path separator here
+ |
+LL | mut qux::Foo::Baz => {}
+ | ~~
error: expected one of `@` or `|`, found `:`
--> $DIR/issue-87086-colon-path-sep.rs:68:12
|
LL | Foo:Bar::Baz => {}
- | ^
+ | ^-------- specifying the type of a pattern isn't supported
| |
| expected one of `@` or `|`
- | help: maybe write a path separator here: `::`
+ |
+help: maybe write a path separator here
+ |
+LL | Foo::Bar::Baz => {}
+ | ~~
error: expected one of `@` or `|`, found `:`
- --> $DIR/issue-87086-colon-path-sep.rs:75:12
+ --> $DIR/issue-87086-colon-path-sep.rs:74:12
|
LL | Foo:Bar => {}
- | ^
+ | ^--- specifying the type of a pattern isn't supported
| |
| expected one of `@` or `|`
- | help: maybe write a path separator here: `::`
-
-error[E0433]: failed to resolve: `Bar` is a variant, not a module
- --> $DIR/issue-87086-colon-path-sep.rs:68:13
|
-LL | Foo:Bar::Baz => {}
- | ^^^ `Bar` is a variant, not a module
+help: maybe write a path separator here
+ |
+LL | Foo::Bar => {}
+ | ~~
-error: aborting due to 10 previous errors
+error: aborting due to 9 previous errors
-For more information about this error, try `rustc --explain E0433`.
diff --git a/tests/ui/parser/issues/issue-87812-path.stderr b/tests/ui/parser/issues/issue-87812-path.stderr
index f8ee05175..d045f4821 100644
--- a/tests/ui/parser/issues/issue-87812-path.stderr
+++ b/tests/ui/parser/issues/issue-87812-path.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
--> $DIR/issue-87812-path.rs:3:24
|
LL | let _: usize = $f;
- | ----- ^^ expected `usize`, found struct `Baz`
+ | ----- ^^ expected `usize`, found `Baz`
| |
| expected due to this
...
diff --git a/tests/ui/parser/issues/issue-88770.rs b/tests/ui/parser/issues/issue-88770.rs
index bb69951c7..9341415b2 100644
--- a/tests/ui/parser/issues/issue-88770.rs
+++ b/tests/ui/parser/issues/issue-88770.rs
@@ -1,9 +1,6 @@
// Regression test for the ICE described in #88770.
// error-pattern:this file contains an unclosed delimiter
-// error-pattern:expected one of
-// error-pattern:missing `in` in `for` loop
-// error-pattern:expected one of `!`, `)`, `,`, `.`, `::`, `;`, `?`, `{`, or an operator, found `e`
fn m(){print!("",(c for&g
u
diff --git a/tests/ui/parser/issues/issue-88770.stderr b/tests/ui/parser/issues/issue-88770.stderr
index 4e3a21613..836f44953 100644
--- a/tests/ui/parser/issues/issue-88770.stderr
+++ b/tests/ui/parser/issues/issue-88770.stderr
@@ -1,5 +1,5 @@
error: this file contains an unclosed delimiter
- --> $DIR/issue-88770.rs:11:3
+ --> $DIR/issue-88770.rs:8:3
|
LL | fn m(){print!("",(c for&g
| - - - unclosed delimiter
@@ -10,51 +10,5 @@ LL | fn m(){print!("",(c for&g
LL | e
| ^
-error: this file contains an unclosed delimiter
- --> $DIR/issue-88770.rs:11:3
- |
-LL | fn m(){print!("",(c for&g
- | - - - unclosed delimiter
- | | |
- | | unclosed delimiter
- | unclosed delimiter
-...
-LL | e
- | ^
-
-error: this file contains an unclosed delimiter
- --> $DIR/issue-88770.rs:11:3
- |
-LL | fn m(){print!("",(c for&g
- | - - - unclosed delimiter
- | | |
- | | unclosed delimiter
- | unclosed delimiter
-...
-LL | e
- | ^
-
-error: missing `in` in `for` loop
- --> $DIR/issue-88770.rs:8:26
- |
-LL | fn m(){print!("",(c for&g
- | __________________________^
-LL | | u
- | |_ help: try adding `in` here
-
-error: expected one of `!`, `)`, `,`, `.`, `::`, `?`, `{`, or an operator, found keyword `for`
- --> $DIR/issue-88770.rs:8:21
- |
-LL | fn m(){print!("",(c for&g
- | ^^^ expected one of 8 possible tokens
-
-error: expected one of `!`, `)`, `,`, `.`, `::`, `;`, `?`, `{`, or an operator, found `e`
- --> $DIR/issue-88770.rs:11:1
- |
-LL | e
- | - expected one of 9 possible tokens
-LL | e
- | ^ unexpected token
-
-error: aborting due to 6 previous errors
+error: aborting due to previous error