]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/region-bound-extra-bound-in-inherent-impl.rs
Auto merge of #57119 - jethrogb:jb/sgx-os-mod2, r=joshtriplett
[rust.git] / src / test / ui / regions / region-bound-extra-bound-in-inherent-impl.rs
1 // Test related to #22779. In this case, the impl is an inherent impl,
2 // so it doesn't have to match any trait, so no error results.
3
4 // compile-pass
5 #![allow(dead_code)]
6
7 struct MySlice<'a, T:'a>(&'a mut [T]);
8
9 impl<'a, T> MySlice<'a, T> {
10     fn renew<'b: 'a>(self) -> &'b mut [T] where 'a: 'b {
11         &mut self.0[..]
12     }
13 }
14
15
16 fn main() { }