mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-04 20:54:13 +00:00
20 lines
280 B
Rust
20 lines
280 B
Rust
// Check that lifetime parameters are allowed in specializing impls.
|
|
|
|
// check-pass
|
|
|
|
#![feature(min_specialization)]
|
|
|
|
trait MySpecTrait {
|
|
fn f();
|
|
}
|
|
|
|
impl<T> MySpecTrait for T {
|
|
default fn f() {}
|
|
}
|
|
|
|
impl<'a, T: ?Sized> MySpecTrait for &'a T {
|
|
fn f() {}
|
|
}
|
|
|
|
fn main() {}
|