rust/tests/ui/impl-trait/in-trait/auxiliary/rpitit.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
253 B
Rust
Raw Normal View History

2023-09-13 16:04:42 +00:00
#![feature(lint_reasons)]
2022-09-23 00:56:55 +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 {
#[expect(refining_impl_trait)]
fn bar(self) -> &'static () {
&()
}
2022-09-23 00:56:55 +00:00
}