about summary refs log tree commit diff
path: root/tests/incremental/const-generics/hash-tyvid-regression-3.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/incremental/const-generics/hash-tyvid-regression-3.rs')
-rw-r--r--tests/incremental/const-generics/hash-tyvid-regression-3.rs26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/incremental/const-generics/hash-tyvid-regression-3.rs b/tests/incremental/const-generics/hash-tyvid-regression-3.rs
new file mode 100644
index 00000000000..61f568f79ef
--- /dev/null
+++ b/tests/incremental/const-generics/hash-tyvid-regression-3.rs
@@ -0,0 +1,26 @@
+// revisions: cfail
+#![feature(generic_const_exprs)]
+#![allow(incomplete_features)]
+// regression test for #79251
+struct Node<const D: usize>
+where
+    SmallVec<{ D * 2 }>: ,
+{
+    keys: SmallVec<{ D * 2 }>,
+}
+
+impl<const D: usize> Node<D>
+where
+    SmallVec<{ D * 2 }>: ,
+{
+    fn new() -> Self {
+        let mut node = Node::new();
+        node.keys.some_function();
+        //~^ error: no method named
+        node
+    }
+}
+
+struct SmallVec<const D: usize> {}
+
+fn main() {}