summaryrefslogtreecommitdiffstats
path: root/tests/ui/specialization/min_specialization/repeating_lifetimes.rs
blob: 49bfacec0ae12d3c370182b8ae31ffaccfbacd12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Test that directly specializing on repeated lifetime parameters is not
// allowed.

#![feature(min_specialization)]

trait X {
    fn f();
}

impl<T> X for T {
    default fn f() {}
}

impl<'a> X for (&'a u8, &'a u8) {
    //~^ ERROR specializing impl repeats parameter `'a`
    fn f() {}
}

fn main() {}