glacier
glacier copied to clipboard
ices/103708.rs: fixed with errors
Issue: https://github.com/rust-lang/rust/issues/103708
#![feature(min_specialization)]
trait Dance {
fn foo();
}
impl<'a, T> Dance for T {
fn foo() {}
}
impl Dance for bool {
fn foo() {}
}
fn main() {}
=== stdout ===
=== stderr ===
error[E0520]: `foo` specializes an item from a parent `impl`, but that item is not marked `default`
--> /home/runner/work/glacier/glacier/ices/103708.rs:12:5
|
7 | impl<'a, T> Dance for T {
| ----------------------- parent `impl` is here
...
12 | fn foo() {}
| ^^^^^^^^ cannot specialize default item `foo`
|
= note: to specialize, `foo` in the parent `impl` must be marked `default`
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0520`.
==============