From 1376c5a617be5c25655d0d7cb63e3beaa5a6e026 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:20:39 +0200 Subject: Merging upstream version 1.70.0+dfsg1. Signed-off-by: Daniel Baumann --- .../in-trait/dont-project-to-rpitit-with-no-value.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tests/ui/impl-trait/in-trait/dont-project-to-rpitit-with-no-value.rs (limited to 'tests/ui/impl-trait/in-trait/dont-project-to-rpitit-with-no-value.rs') diff --git a/tests/ui/impl-trait/in-trait/dont-project-to-rpitit-with-no-value.rs b/tests/ui/impl-trait/in-trait/dont-project-to-rpitit-with-no-value.rs new file mode 100644 index 000000000..8329ce1f8 --- /dev/null +++ b/tests/ui/impl-trait/in-trait/dont-project-to-rpitit-with-no-value.rs @@ -0,0 +1,19 @@ +// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty +// revisions: current next + +#![feature(return_position_impl_trait_in_trait)] +//~^ WARN the feature `return_position_impl_trait_in_trait` is incomplete + +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() {} -- cgit v1.2.3