]> git.proxmox.com Git - rustc.git/blob - tests/ui/regions/region-bound-same-bounds-in-trait-and-impl.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / 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 // check-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() { }