summaryrefslogtreecommitdiffstats
path: root/tests/ui/impl-trait/in-trait/default-method-constraint.rs
blob: 8ab2e2797f1a76a2f823cb07151870723319acc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// check-pass

// This didn't work in the previous default RPITIT method hack attempt


trait Foo {
    fn bar(x: bool) -> impl Sized {
        if x {
            let _: u32 = Self::bar(!x);
        }
        Default::default()
    }
}

fn main() {}