summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/const-eval/issue-104390.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/consts/const-eval/issue-104390.rs')
-rw-r--r--tests/ui/consts/const-eval/issue-104390.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/consts/const-eval/issue-104390.rs b/tests/ui/consts/const-eval/issue-104390.rs
new file mode 100644
index 000000000..602d81824
--- /dev/null
+++ b/tests/ui/consts/const-eval/issue-104390.rs
@@ -0,0 +1,10 @@
+fn f1() -> impl Sized { & 2E } //~ ERROR expected at least one digit in exponent
+fn f2() -> impl Sized { && 2E } //~ ERROR expected at least one digit in exponent
+fn f3() -> impl Sized { &'a 2E } //~ ERROR expected at least one digit in exponent
+//~^ ERROR borrow expressions cannot be annotated with lifetimes
+fn f4() -> impl Sized { &'static 2E } //~ ERROR expected at least one digit in exponent
+//~^ ERROR borrow expressions cannot be annotated with lifetimes
+fn f5() -> impl Sized { *& 2E } //~ ERROR expected at least one digit in exponent
+fn f6() -> impl Sized { &'_ 2E } //~ ERROR expected at least one digit in exponent
+//~^ ERROR borrow expressions cannot be annotated with lifetimes
+fn main() {}