From a4b7ed7a42c716ab9f05e351f003d589124fd55d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:18:58 +0200 Subject: Adding upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- src/test/ui/regions/region-object-lifetime-5.rs | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 src/test/ui/regions/region-object-lifetime-5.rs (limited to 'src/test/ui/regions/region-object-lifetime-5.rs') diff --git a/src/test/ui/regions/region-object-lifetime-5.rs b/src/test/ui/regions/region-object-lifetime-5.rs deleted file mode 100644 index ad3593671..000000000 --- a/src/test/ui/regions/region-object-lifetime-5.rs +++ /dev/null @@ -1,14 +0,0 @@ -// Various tests related to testing how region inference works -// with respect to the object receivers. - -trait Foo { - fn borrowed<'a>(&'a self) -> &'a (); -} - -// Here, the object is bounded by an anonymous lifetime and returned -// as `&'static`, so you get an error. -fn owned_receiver(x: Box) -> &'static () { - x.borrowed() //~ ERROR cannot return reference to local data `*x` -} - -fn main() {} -- cgit v1.2.3