]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/region-bound-same-bounds-in-trait-and-impl.rs
Rollup merge of #57278 - mati865:config_clippy, r=alexcrichton
[rust.git] / src / test / ui / regions / region-bound-same-bounds-in-trait-and-impl.rs
1 // Test related to #22779, but where the `'a:'b` relation
2 // appears in the trait too. No error here.
3
4 // compile-pass
5
6 trait Tr<'a, T> {
7     fn renew<'b: 'a>(self) -> &'b mut [T] where 'a: 'b;
8 }
9
10 impl<'a, T> Tr<'a, T> for &'a mut [T] {
11     fn renew<'b: 'a>(self) -> &'b mut [T] where 'a: 'b {
12         &mut self[..]
13     }
14 }
15
16
17 fn main() { }