blob: 46c281d10e7653d0736f40372580d698a5103917 [file]
//@ revisions: current next
//@ ignore-compare-mode-next-solver (explicit revisions)
//@[next] compile-flags: -Znext-solver
trait MyDebug {
fn my_debug(&self);
}
impl<T> MyDebug for &T
where
T: std::fmt::Debug,
{
fn my_debug(&self) {}
}
fn my_foo() -> impl std::fmt::Debug {
if false {
let x = my_foo();
x.my_debug();
//~^ ERROR no method named `my_debug` found
}
()
}
fn main() {}