2023-11-21 06:58:01 -06:00
|
|
|
// check-pass
|
2023-11-17 16:05:42 -06:00
|
|
|
|
|
|
|
use std::ops::Deref;
|
|
|
|
|
|
|
|
trait Bar<'a> {}
|
|
|
|
trait Foo<'a>: Bar<'a> {}
|
|
|
|
|
|
|
|
impl<'a> Deref for dyn Foo<'a> {
|
2023-11-21 06:58:01 -06:00
|
|
|
//~^ WARN this `Deref` implementation is covered by an implicit supertrait coercion
|
2023-11-17 16:05:42 -06:00
|
|
|
type Target = dyn Bar<'a>;
|
|
|
|
|
|
|
|
fn deref(&self) -> &Self::Target {
|
|
|
|
todo!()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|