rust/tests/ui/impl-trait/in-trait/deep-match-works.rs

20 lines
281 B
Rust
Raw Normal View History

// check-pass
2023-09-13 11:04:42 -05:00
#![feature(lint_reasons)]
#![allow(incomplete_features)]
pub struct Wrapper<T>(T);
pub trait Foo {
fn bar() -> Wrapper<impl Sized>;
}
impl Foo for () {
#[expect(refining_impl_trait)]
fn bar() -> Wrapper<i32> {
Wrapper(0)
}
}
fn main() {}