blob: 4219bd13b1816cdc3331c6b0f65f3521dbf4832f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
// Test that specializing on a `rustc_unsafe_specialization_marker` trait is
// allowed.
// check-pass
#![feature(min_specialization)]
#![feature(rustc_attrs)]
#[rustc_unsafe_specialization_marker]
trait SpecMarker {}
trait X {
fn f();
}
impl<T> X for T {
default fn f() {}
}
impl<T: SpecMarker> X for T {
fn f() {}
}
fn main() {}
|