2023-09-07 00:45:12 +00:00
|
|
|
#![feature(return_position_impl_trait_in_trait, lint_reasons)]
|
2022-09-23 00:56:55 +00:00
|
|
|
|
2023-03-21 18:06:04 +00:00
|
|
|
use std::ops::Deref;
|
|
|
|
|
2022-09-23 00:56:55 +00:00
|
|
|
pub trait Foo {
|
2023-04-30 21:52:35 +00:00
|
|
|
fn bar(self) -> impl Deref<Target = impl Sized>;
|
2022-09-23 00:56:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
pub struct Foreign;
|
|
|
|
impl Foo for Foreign {
|
2023-09-07 00:45:12 +00:00
|
|
|
#[expect(refining_impl_trait)]
|
2023-06-24 00:00:08 -03:00
|
|
|
fn bar(self) -> &'static () {
|
|
|
|
&()
|
|
|
|
}
|
2022-09-23 00:56:55 +00:00
|
|
|
}
|