2022-09-02 16:02:59 -05:00
|
|
|
// check-pass
|
|
|
|
|
2023-09-06 19:45:12 -05:00
|
|
|
#![feature(return_position_impl_trait_in_trait, lint_reasons)]
|
2022-09-02 16:02:59 -05:00
|
|
|
#![allow(incomplete_features)]
|
|
|
|
|
2023-09-06 19:45:12 -05:00
|
|
|
pub struct Wrapper<T>(T);
|
2022-09-02 16:02:59 -05:00
|
|
|
|
2023-09-06 19:45:12 -05:00
|
|
|
pub trait Foo {
|
2022-09-02 16:02:59 -05:00
|
|
|
fn bar() -> Wrapper<impl Sized>;
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Foo for () {
|
2023-09-06 19:45:12 -05:00
|
|
|
#[expect(refining_impl_trait)]
|
2023-03-08 08:18:38 -06:00
|
|
|
fn bar() -> Wrapper<i32> {
|
|
|
|
Wrapper(0)
|
|
|
|
}
|
2022-09-02 16:02:59 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|