about summary refs log tree commit diff
path: root/tests/ui/parser
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-09-13 10:43:09 +0000
committerbors <bors@rust-lang.org>2025-09-13 10:43:09 +0000
commitb50f345a2f3f49764024cabc30ef99e15c0240f7 (patch)
tree542d89dfb423203f19a9ce2345be87bb2ef7f0cb /tests/ui/parser
parent064cc81354a940e297a1be4dfa9e26759c8431be (diff)
parentc4539b2d58d97093fc08a42561397fa98e75c684 (diff)
downloadrust-b50f345a2f3f49764024cabc30ef99e15c0240f7.tar.gz
rust-b50f345a2f3f49764024cabc30ef99e15c0240f7.zip
Auto merge of #146499 - jhpratt:rollup-ufflehe, r=jhpratt
Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#144498 (Add --print target-spec-json-schema)
 - rust-lang/rust#145471 (Stabilize BTree{Map,Set}::extract_if)
 - rust-lang/rust#145896 (Rehome 30 `tests/ui/issues/` tests to other subdirectories under `tests/ui/` [rust-lang/rust#3 of Batch rust-lang/rust#2])
 - rust-lang/rust#146450 (bootstrap: rustdoc-js tests can now be filtered by js files)
 - rust-lang/rust#146456 (Fix panic and incorrectly suggested examples in `format_args` macro.)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'tests/ui/parser')
-rw-r--r--tests/ui/parser/invalid-variable-definition-55587.rs6
-rw-r--r--tests/ui/parser/invalid-variable-definition-55587.stderr11
2 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/parser/invalid-variable-definition-55587.rs b/tests/ui/parser/invalid-variable-definition-55587.rs
new file mode 100644
index 00000000000..f2c7c0a8e6c
--- /dev/null
+++ b/tests/ui/parser/invalid-variable-definition-55587.rs
@@ -0,0 +1,6 @@
+// https://github.com/rust-lang/rust/issues/55587
+use std::path::Path;
+
+fn main() {
+    let Path::new(); //~ ERROR expected tuple struct or tuple variant
+}
diff --git a/tests/ui/parser/invalid-variable-definition-55587.stderr b/tests/ui/parser/invalid-variable-definition-55587.stderr
new file mode 100644
index 00000000000..08c951582e3
--- /dev/null
+++ b/tests/ui/parser/invalid-variable-definition-55587.stderr
@@ -0,0 +1,11 @@
+error[E0164]: expected tuple struct or tuple variant, found associated function `Path::new`
+  --> $DIR/invalid-variable-definition-55587.rs:5:9
+   |
+LL |     let Path::new();
+   |         ^^^^^^^^^^^ `fn` calls are not allowed in patterns
+   |
+   = help: for more information, visit https://doc.rust-lang.org/book/ch19-00-patterns.html
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0164`.