about summary refs log tree commit diff
path: root/tests/ui/impl-trait/in-trait/default-body-with-rpit.rs
blob: 1bbff839ffa5654a2e6d2857a2fa550364b2678f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//@ edition:2021
//@ check-pass
//@ revisions: current next
//@ ignore-compare-mode-next-solver (explicit revisions)
//@[next] compile-flags: -Znext-solver

use std::fmt::Debug;

trait Foo {
    #[allow(async_fn_in_trait)]
    async fn baz(&self) -> impl Debug {
        ""
    }
}

struct Bar;

impl Foo for Bar {}

fn main() {
    let _ = Bar.baz();
}