summaryrefslogtreecommitdiffstats
path: root/src/test/ui/const-generics/issues/issue-83466.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/const-generics/issues/issue-83466.rs')
-rw-r--r--src/test/ui/const-generics/issues/issue-83466.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/ui/const-generics/issues/issue-83466.rs b/src/test/ui/const-generics/issues/issue-83466.rs
new file mode 100644
index 000000000..c488a663f
--- /dev/null
+++ b/src/test/ui/const-generics/issues/issue-83466.rs
@@ -0,0 +1,17 @@
+// regression test for #83466- tests that generic arg mismatch errors between
+// consts and types are not supressed when there are explicit late bound lifetimes
+
+struct S;
+impl S {
+ fn func<'a, U>(self) -> U {
+ todo!()
+ }
+}
+fn dont_crash<'a, U>() {
+ S.func::<'a, 10_u32>()
+ //~^ WARNING cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
+ //~^^ WARNING this was previously accepted by
+ //~^^^ ERROR constant provided when a type was expected [E0747]
+}
+
+fn main() {}