mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
20 lines
302 B
Rust
20 lines
302 B
Rust
// check-pass
|
|
|
|
#![feature(lint_reasons)]
|
|
#![allow(incomplete_features)]
|
|
|
|
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();
|
|
}
|