2023-03-09 14:49:05 -06:00
|
|
|
#![feature(min_specialization)]
|
|
|
|
|
|
|
|
// An impl that has an erroneous const substitution should not specialize one
|
|
|
|
// that is well-formed.
|
2023-03-18 21:17:44 -05:00
|
|
|
#[derive(Clone)]
|
2023-03-09 14:49:05 -06:00
|
|
|
struct S<const L: usize>;
|
|
|
|
|
|
|
|
impl<const N: i32> Copy for S<N> {}
|
2023-03-18 21:20:15 -05:00
|
|
|
//~^ ERROR the constant `N` is not of type `usize`
|
2023-03-09 14:49:05 -06:00
|
|
|
impl<const M: usize> Copy for S<M> {}
|
|
|
|
|
|
|
|
fn main() {}
|