rust/tests/ui/impl-trait/in-trait/default-method-constraint.rs
2023-10-13 21:01:36 +00:00

16 lines
250 B
Rust

// 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() {}