rust/tests/ui/specialization/min_specialization/specialize_nothing.rs
Matthew Jasper bd928a0b5e Disallow (min) specialization imps with no items
Such implementations are usually mistakes and are not used in the
compiler or standard library (after this commit) so forbid them with
`min_specialization`.
2023-05-05 16:19:18 +01:00

15 lines
235 B
Rust

#![feature(min_specialization)]
trait Special {
fn be_special();
}
impl<T> Special for T {
fn be_special() {}
}
impl Special for usize {}
//~^ ERROR specialization impl does not specialize any associated items
fn main() {}