2 #![allow(unused_imports)]
3 // Regression test for issue #22246 -- we should be able to deduce
4 // that `&'a B::Owned` implies that `B::Owned : 'a`.
6 // pretty-expanded FIXME #23616
12 pub trait ToOwned: Sized {
13 type Owned: Borrow<Self>;
14 fn to_owned(&self) -> Self::Owned;
17 pub trait Borrow<Borrowed> {
18 fn borrow(&self) -> &Borrowed;
21 pub struct Foo<B:ToOwned> {
25 fn foo<B:ToOwned>(this: &Foo<B>) -> &B {