about summary refs log tree commit diff
path: root/tests/ui/specialization/min_specialization/spec-reference.rs
blob: f6cf6b21b0fa4fd2d3067f01cd0fca77f4c08f5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// 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() {}