]> git.proxmox.com Git - rustc.git/blob - tests/ui/compare-method/region-extra-2.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / 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() { }