rust/tests/ui/impl-trait/in-trait/auxiliary/rpitit.rs
2023-04-30 21:52:35 +00:00

15 lines
295 B
Rust

// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
#![feature(return_position_impl_trait_in_trait)]
use std::ops::Deref;
pub trait Foo {
fn bar(self) -> impl Deref<Target = impl Sized>;
}
pub struct Foreign;
impl Foo for Foreign {
fn bar(self) -> &'static () { &() }
}