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

17 lines
245 B
Rust
Raw Permalink Normal View History

2022-09-06 17:16:08 +00:00
//@ check-pass
pub trait Foo {
2022-09-06 17:16:08 +00:00
fn f() -> Box<impl Sized>;
}
impl Foo for () {
#[expect(refining_impl_trait)]
2022-09-06 17:16:08 +00:00
fn f() -> Box<String> {
Box::new(String::new())
}
}
fn main() {
let x: Box<String> = <() as Foo>::f();
}