blob: 17f7cad660db13e9879cca60d8fac5e9fe16b34b (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 | //@ revisions: current next
//@[next] compile-flags: -Znext-solver
//@[current] check-pass
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();
        //[next]~^ type annotations needed
        x.my_debug();
    }
    ()
}
fn main() {}
 |