about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/parser/issues/issue-112458.rs4
-rw-r--r--tests/ui/parser/issues/issue-112458.stderr15
2 files changed, 19 insertions, 0 deletions
diff --git a/tests/ui/parser/issues/issue-112458.rs b/tests/ui/parser/issues/issue-112458.rs
new file mode 100644
index 00000000000..36895450cd9
--- /dev/null
+++ b/tests/ui/parser/issues/issue-112458.rs
@@ -0,0 +1,4 @@
+fn main() {
+    println!("{}", x.); //~ ERROR unexpected token: `)`
+    //~^ ERROR cannot find value `x` in this scope
+}
diff --git a/tests/ui/parser/issues/issue-112458.stderr b/tests/ui/parser/issues/issue-112458.stderr
new file mode 100644
index 00000000000..54a8f1d03b0
--- /dev/null
+++ b/tests/ui/parser/issues/issue-112458.stderr
@@ -0,0 +1,15 @@
+error: unexpected token: `)`
+  --> $DIR/issue-112458.rs:2:22
+   |
+LL |     println!("{}", x.);
+   |                      ^
+
+error[E0425]: cannot find value `x` in this scope
+  --> $DIR/issue-112458.rs:2:20
+   |
+LL |     println!("{}", x.);
+   |                    ^ not found in this scope
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0425`.