summaryrefslogtreecommitdiffstats
path: root/tests/ui/const-generics/type-dependent/issue-73730.rs
blob: 5e1b8c635372326abe43cc5c2ba81bdc1f885ff3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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>();
}