summaryrefslogtreecommitdiffstats
path: root/tests/incremental/const-generics/hash-tyvid-regression-3.rs
blob: 61f568f79ef92419a3428cbc1be3f7ef0e55efb9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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() {}