about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-03-22 19:07:36 +0100
committerGitHub <noreply@github.com>2022-03-22 19:07:36 +0100
commit5d3dfb446fc696bbeea796ee8e5230ba96ba41b9 (patch)
tree8e28d3e8e4d564f41bb3e9a824010f05faaae9a1 /src/test
parent0e80a7ab59731bdbba6a55f17bd825b2059ee3df (diff)
parent62ded071d588b92b394c4561d19d517d87074728 (diff)
downloadrust-5d3dfb446fc696bbeea796ee8e5230ba96ba41b9.tar.gz
rust-5d3dfb446fc696bbeea796ee8e5230ba96ba41b9.zip
Rollup merge of #95200 - TaKO8Ki:cancel-not-emitted-error-when-parsing-generic-arg, r=oli-obk
Cancel a not emitted error after parsing const generic args

closes #95163
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/const-generics/ice-const-generic-function-return-ty.rs5
-rw-r--r--src/test/ui/const-generics/ice-const-generic-function-return-ty.stderr8
2 files changed, 13 insertions, 0 deletions
diff --git a/src/test/ui/const-generics/ice-const-generic-function-return-ty.rs b/src/test/ui/const-generics/ice-const-generic-function-return-ty.rs
new file mode 100644
index 00000000000..2bf628af8a7
--- /dev/null
+++ b/src/test/ui/const-generics/ice-const-generic-function-return-ty.rs
@@ -0,0 +1,5 @@
+// #95163
+fn return_ty() -> impl Into<<() as Reexported;
+//~^ ERROR expected one of `(`, `::`, `<`, or `>`, found `;`
+
+fn main() {}
diff --git a/src/test/ui/const-generics/ice-const-generic-function-return-ty.stderr b/src/test/ui/const-generics/ice-const-generic-function-return-ty.stderr
new file mode 100644
index 00000000000..a72f5800a07
--- /dev/null
+++ b/src/test/ui/const-generics/ice-const-generic-function-return-ty.stderr
@@ -0,0 +1,8 @@
+error: expected one of `(`, `::`, `<`, or `>`, found `;`
+  --> $DIR/ice-const-generic-function-return-ty.rs:2:46
+   |
+LL | fn return_ty() -> impl Into<<() as Reexported;
+   |                                              ^ expected one of `(`, `::`, `<`, or `>`
+
+error: aborting due to previous error
+