rust/tests/ui/impl-trait/in-trait/dont-project-to-rpitit-with-no-value.rs
2023-05-02 05:04:50 +00:00

19 lines
389 B
Rust

// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty
// revisions: current next
#![feature(return_position_impl_trait_in_trait)]
trait MyTrait {
fn foo(&self) -> impl Sized;
fn bar(&self) -> impl Sized;
}
impl MyTrait for i32 {
//~^ ERROR not all trait items implemented, missing: `foo`
fn bar(&self) -> impl Sized {
self.foo()
}
}
fn main() {}