summaryrefslogtreecommitdiffstats
path: root/src/test/ui/compare-method/region-extra-2.rs
blob: 3d57b544e16af826d50c5d5e2f21ab7861b1af6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Regression test for issue #22779. An extra where clause was
// permitted on the impl that is not present on the trait.

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

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

fn main() { }