]> git.lizzy.rs Git - rust.git/blob - src/test/ui/compare-method/region-extra-2.rs
Rollup merge of #57107 - mjbshaw:thread_local_test, r=nikomatsakis
[rust.git] / src / test / ui / compare-method / region-extra-2.rs
1 // Regression test for issue #22779. An extra where clause was
2 // permitted on the impl that is not present on the trait.
3
4 trait Tr<'a, T> {
5     fn renew<'b: 'a>(self) -> &'b mut [T];
6 }
7
8 impl<'a, T> Tr<'a, T> for &'a mut [T] {
9     fn renew<'b: 'a>(self) -> &'b mut [T] where 'a: 'b {
10         //~^ ERROR E0276
11         &mut self[..]
12     }
13 }
14
15 fn main() { }