summaryrefslogtreecommitdiffstats
path: root/tests/ui/impl-trait/in-trait/default-method-constraint.rs
blob: e85fe3c8626f45e003d6a39d9e7ab3d196cad744 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// check-pass
// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
// revisions: current next

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

#![feature(return_position_impl_trait_in_trait)]
//~^ WARN the feature `return_position_impl_trait_in_trait` is incomplete

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

fn main() {}