Files
rust/tests/ui/specialization/min_specialization/bad-const-wf-doesnt-specialize.rs
Noah Lev e0bd01167e Re-enable ConstArgKind::Path lowering by default
...and remove the `const_arg_path` feature gate as a result. It was only
a stopgap measure to fix the regression that the new lowering introduced
(which should now be fixed by this PR).
2024-09-12 13:56:01 -04:00

13 lines
339 B
Rust

#![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() {}