rust/tests/ui/impl-trait/in-trait/default-body-with-rpit.rs

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

23 lines
354 B
Rust
Raw Normal View History

2022-10-05 03:52:38 +00:00
//@ edition:2021
//@ check-pass
//@ revisions: current next
//@ ignore-compare-mode-next-solver (explicit revisions)
//@[next] compile-flags: -Znext-solver
2022-10-05 03:52:38 +00:00
use std::fmt::Debug;
trait Foo {
2023-09-26 20:20:25 +00:00
#[allow(async_fn_in_trait)]
2022-10-05 03:52:38 +00:00
async fn baz(&self) -> impl Debug {
""
}
}
struct Bar;
impl Foo for Bar {}
fn main() {
let _ = Bar.baz();
}