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