mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-02 07:22:42 +00:00
19 lines
280 B
Rust
19 lines
280 B
Rust
// Test that directly specializing on `'static` is not allowed.
|
|
|
|
#![feature(min_specialization)]
|
|
|
|
trait X {
|
|
fn f();
|
|
}
|
|
|
|
impl<T> X for &'_ T {
|
|
default fn f() {}
|
|
}
|
|
|
|
impl X for &'static u8 {
|
|
//~^ ERROR cannot specialize on `'static` lifetime
|
|
fn f() {}
|
|
}
|
|
|
|
fn main() {}
|