rust/tests/ui/impl-trait/in-trait/default-method-constraint.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
251 B
Rust
Raw Normal View History

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