summaryrefslogtreecommitdiffstats
path: root/src/test/ui/const-generics/type-dependent/qpath.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/const-generics/type-dependent/qpath.rs')
-rw-r--r--src/test/ui/const-generics/type-dependent/qpath.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/ui/const-generics/type-dependent/qpath.rs b/src/test/ui/const-generics/type-dependent/qpath.rs
new file mode 100644
index 000000000..2d678d0ac
--- /dev/null
+++ b/src/test/ui/const-generics/type-dependent/qpath.rs
@@ -0,0 +1,9 @@
+// run-pass
+struct A;
+impl A {
+ fn foo<const N: usize>() -> usize { N + 1 }
+}
+
+fn main() {
+ assert_eq!(A::foo::<7>(), 8);
+}