rust/tests/ui/impl-trait/in-trait/auxiliary/rpitit.rs
2023-09-07 01:31:32 +00:00

16 lines
290 B
Rust

#![feature(return_position_impl_trait_in_trait, lint_reasons)]
use std::ops::Deref;
pub trait Foo {
fn bar(self) -> impl Deref<Target = impl Sized>;
}
pub struct Foreign;
impl Foo for Foreign {
#[expect(refining_impl_trait)]
fn bar(self) -> &'static () {
&()
}
}