summaryrefslogtreecommitdiffstats
path: root/src/test/ui/const-generics/type-dependent/issue-73730.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/const-generics/type-dependent/issue-73730.rs')
-rw-r--r--src/test/ui/const-generics/type-dependent/issue-73730.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/const-generics/type-dependent/issue-73730.rs b/src/test/ui/const-generics/type-dependent/issue-73730.rs
new file mode 100644
index 000000000..5e1b8c635
--- /dev/null
+++ b/src/test/ui/const-generics/type-dependent/issue-73730.rs
@@ -0,0 +1,14 @@
+// check-pass
+trait Foo<'a, A>: Iterator<Item=A> {
+ fn bar<const N: usize>(&mut self) -> *const [A; N];
+}
+
+impl<'a, A, I: ?Sized> Foo<'a, A> for I where I: Iterator<Item=A> {
+ fn bar<const N: usize>(&mut self) -> *const [A; N] {
+ std::ptr::null()
+ }
+}
+
+fn main() {
+ (0_u8 .. 10).bar::<10_usize>();
+}