diff options
Diffstat (limited to 'src/test/ui/const-generics/type-dependent/simple.rs')
-rw-r--r-- | src/test/ui/const-generics/type-dependent/simple.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/ui/const-generics/type-dependent/simple.rs b/src/test/ui/const-generics/type-dependent/simple.rs new file mode 100644 index 000000000..1b13133b5 --- /dev/null +++ b/src/test/ui/const-generics/type-dependent/simple.rs @@ -0,0 +1,9 @@ +// run-pass +struct R; + +impl R { + fn method<const N: u8>(&self) -> u8 { N } +} +fn main() { + assert_eq!(R.method::<1u8>(), 1); +} |