]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/type-dependent/issue-73730.rs
Rollup merge of #75471 - richkadel:llvm-program-name, r=wesleywiser
[rust.git] / src / test / ui / const-generics / type-dependent / issue-73730.rs
1 // check-pass
2 #![feature(const_generics)]
3 #![allow(incomplete_features)]
4
5 trait Foo<'a, A>: Iterator<Item=A> {
6     fn bar<const N: usize>(&mut self) -> *const [A; N];
7 }
8
9 impl<'a, A, I: ?Sized> Foo<'a, A> for I where I: Iterator<Item=A>  {
10     fn bar<const N: usize>(&mut self) -> *const [A; N] {
11         std::ptr::null()
12     }
13 }
14
15 fn main() {
16     (0_u8 .. 10).bar::<10_usize>();
17 }