summaryrefslogtreecommitdiffstats
path: root/src/test/ui/const-generics/different_generic_args.rs
blob: 9ee0e0747c4c2a28458d08833afa90cfb4bdf5e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// Check that types with different const arguments are different.
// revisions: full min

#![cfg_attr(full, feature(generic_const_exprs))]
#![cfg_attr(full, allow(incomplete_features))]

struct ConstUsize<const V: usize> {}

fn main() {
    let mut u = ConstUsize::<3> {};
    u = ConstUsize::<4> {};
    //~^ ERROR mismatched types
}