]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/type-dependent/issue-73730.rs
Merge commit '5034d47f721ff4c3a3ff2aca9ef2ef3e1d067f9f' into clippyup
[rust.git] / src / test / ui / const-generics / type-dependent / issue-73730.rs
1 // check-pass
2 // revisions: full min
3 #![cfg_attr(full, feature(const_generics))]
4 #![cfg_attr(full, allow(incomplete_features))]
5 #![cfg_attr(min, feature(min_const_generics))]
6
7 trait Foo<'a, A>: Iterator<Item=A> {
8     fn bar<const N: usize>(&mut self) -> *const [A; N];
9 }
10
11 impl<'a, A, I: ?Sized> Foo<'a, A> for I where I: Iterator<Item=A>  {
12     fn bar<const N: usize>(&mut self) -> *const [A; N] {
13         std::ptr::null()
14     }
15 }
16
17 fn main() {
18     (0_u8 .. 10).bar::<10_usize>();
19 }