about summary refs log tree commit diff
path: root/tests/ui/impl-trait/in-trait/reveal.rs
blob: f6ce31e38379c3b1e1b8399e83ec2a4653b3a18e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//@ check-pass

pub trait Foo {
    fn f() -> Box<impl Sized>;
}

impl Foo for () {
    #[expect(refining_impl_trait)]
    fn f() -> Box<String> {
        Box::new(String::new())
    }
}

fn main() {
    let x: Box<String> = <() as Foo>::f();
}