Skip to content

Commit

Permalink
add regression test for #73730
Browse files Browse the repository at this point in the history
  • Loading branch information
lcnr committed Jul 16, 2020
1 parent e230950 commit d187e81
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/test/ui/const-generics/type-dependent/issue-73730.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// check-pass
#![feature(const_generics)]
#![allow(incomplete_features)]

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>();
}

0 comments on commit d187e81

Please sign in to comment.