rust/tests/ui/regions/region-bound-same-bounds-in-trait-and-impl.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
338 B
Rust
Raw Normal View History

// Test related to #22779, but where the `'a:'b` relation
// appears in the trait too. No error here.
// check-pass
trait Tr<'a, T> {
fn renew<'b: 'a>(self) -> &'b mut [T] where 'a: 'b;
}
impl<'a, T> Tr<'a, T> for &'a mut [T] {
fn renew<'b: 'a>(self) -> &'b mut [T] where 'a: 'b {
&mut self[..]
}
}
fn main() { }