2023-02-20 20:01:26 -06:00
|
|
|
// check-pass
|
2023-03-15 17:55:00 -05:00
|
|
|
// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
|
|
|
|
// revisions: current next
|
2023-02-20 20:01:26 -06:00
|
|
|
|
|
|
|
// This didn't work in the previous default RPITIT method hack attempt
|
|
|
|
|
|
|
|
#![feature(return_position_impl_trait_in_trait)]
|
|
|
|
|
|
|
|
trait Foo {
|
|
|
|
fn bar(x: bool) -> impl Sized {
|
|
|
|
if x {
|
|
|
|
let _: u32 = Self::bar(!x);
|
|
|
|
}
|
|
|
|
Default::default()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|