about summary refs log tree commit diff
path: root/tests/ui/specialization/min_specialization/bad-const-wf-doesnt-specialize.rs
blob: a0ee77144177262da346c9f97a9a6b7f8016f1b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#![feature(min_specialization)]

// An impl that has an erroneous const substitution should not specialize one
// that is well-formed.
#[derive(Clone)]
struct S<const L: usize>;

impl<const N: i32> Copy for S<N> {}
impl<const M: usize> Copy for S<M> {}
//~^ ERROR: conflicting implementations of trait `Copy` for type `S<_>`

fn main() {}