From 62ded071d588b92b394c4561d19d517d87074728 Mon Sep 17 00:00:00 2001 From: Takayuki Maeda Date: Tue, 22 Mar 2022 16:06:56 +0900 Subject: cancel a not emitted error after parsing const generic args --- .../ui/const-generics/ice-const-generic-function-return-ty.rs | 5 +++++ .../ui/const-generics/ice-const-generic-function-return-ty.stderr | 8 ++++++++ 2 files changed, 13 insertions(+) create mode 100644 src/test/ui/const-generics/ice-const-generic-function-return-ty.rs create mode 100644 src/test/ui/const-generics/ice-const-generic-function-return-ty.stderr (limited to 'src/test') 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 + -- cgit 1.4.1-3-g733a5