From 631cd5845e8de329d0e227aaa707d7ea228b8f8f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:20:29 +0200 Subject: Merging upstream version 1.70.0+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/impl-trait/in-trait/foreign.rs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'tests/ui/impl-trait/in-trait/foreign.rs') diff --git a/tests/ui/impl-trait/in-trait/foreign.rs b/tests/ui/impl-trait/in-trait/foreign.rs index 6341f5b42..f4972d948 100644 --- a/tests/ui/impl-trait/in-trait/foreign.rs +++ b/tests/ui/impl-trait/in-trait/foreign.rs @@ -1,9 +1,21 @@ // check-pass // aux-build: rpitit.rs +// [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty +// revisions: current next extern crate rpitit; +use std::sync::Arc; + +// Implement an RPITIT from another crate. +struct Local; +impl rpitit::Foo for Local { + fn bar() -> Arc { Arc::new(String::new()) } +} + fn main() { - // Witness an RPITIT from another crate - let () = ::bar(); + // Witness an RPITIT from another crate. + let &() = ::bar(); + + let x: Arc = ::bar(); } -- cgit v1.2.3