about summary refs log tree commit diff
path: root/tests/ui
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2025-01-18 09:11:05 +0100
committerGitHub <noreply@github.com>2025-01-18 09:11:05 +0100
commit233fd55e6e60ec0c19454ac382e5a8efbbd1aceb (patch)
treebee66eeb00f8e9e6ab140ff49a1e15288f7db5de /tests/ui
parent8fec08b988ba1acbefaaeec9b2c49beb5419bfb0 (diff)
parent865a09d50a6eb5bb079310f0777e4e7afd1c676d (diff)
downloadrust-233fd55e6e60ec0c19454ac382e5a8efbbd1aceb.tar.gz
rust-233fd55e6e60ec0c19454ac382e5a8efbbd1aceb.zip
Rollup merge of #135611 - chenyukang:yukang-fix-135341-ice-crash, r=oli-obk
Remove unnecessary assertion for reference error

Fixes #135341

From comment: https://github.com/rust-lang/rust/issues/135341#issuecomment-2594430504

r? ``@oli-obk``
Diffstat (limited to 'tests/ui')
-rw-r--r--tests/ui/wf/ice-hir-wf-issue-135341.rs4
-rw-r--r--tests/ui/wf/ice-hir-wf-issue-135341.stderr9
2 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/wf/ice-hir-wf-issue-135341.rs b/tests/ui/wf/ice-hir-wf-issue-135341.rs
new file mode 100644
index 00000000000..7428575aee0
--- /dev/null
+++ b/tests/ui/wf/ice-hir-wf-issue-135341.rs
@@ -0,0 +1,4 @@
+type A<T> = B;
+type B = _; //~ ERROR the placeholder `_` is not allowed within types on item signatures for type aliases
+
+fn main() {}
diff --git a/tests/ui/wf/ice-hir-wf-issue-135341.stderr b/tests/ui/wf/ice-hir-wf-issue-135341.stderr
new file mode 100644
index 00000000000..c568129cf56
--- /dev/null
+++ b/tests/ui/wf/ice-hir-wf-issue-135341.stderr
@@ -0,0 +1,9 @@
+error[E0121]: the placeholder `_` is not allowed within types on item signatures for type aliases
+  --> $DIR/ice-hir-wf-issue-135341.rs:2:10
+   |
+LL | type B = _;
+   |          ^ not allowed in type signatures
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0121`.