summaryrefslogtreecommitdiffstats
path: root/tests/ui/regions/region-bound-same-bounds-in-trait-and-impl.rs
blob: 68056370c44892952ffe1e7fddc11b0d3eeb4f81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Test related to #22779, but where the `'a:'b` relation
// appears in the trait too. No error here.

// check-pass

trait Tr<'a, T> {
    fn renew<'b: 'a>(self) -> &'b mut [T] where 'a: 'b;
}

impl<'a, T> Tr<'a, T> for &'a mut [T] {
    fn renew<'b: 'a>(self) -> &'b mut [T] where 'a: 'b {
        &mut self[..]
    }
}


fn main() { }