Skip to content

Commit

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

struct Struct<const N: usize>;

impl<const N: usize> Struct<N> {
fn method<const M: usize>(&self) {}
}

fn test<const N: usize, const M: usize>(x: Struct<N>) {
Struct::<N>::method::<M>(&x);
x.method::<N>();
}

fn main() {}

0 comments on commit 137ca05

Please sign in to comment.