Skip to content

Commit 137ca05

Browse files
committed
add regression test for rust-lang#70217
1 parent 333dce9 commit 137ca05

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// check-pass
2+
#![feature(const_generics)]
3+
#![allow(incomplete_features)]
4+
5+
struct Struct<const N: usize>;
6+
7+
impl<const N: usize> Struct<N> {
8+
fn method<const M: usize>(&self) {}
9+
}
10+
11+
fn test<const N: usize, const M: usize>(x: Struct<N>) {
12+
Struct::<N>::method::<M>(&x);
13+
x.method::<N>();
14+
}
15+
16+
fn main() {}

0 commit comments

Comments
 (0)