summaryrefslogtreecommitdiffstats
path: root/src/test/ui/regions/region-object-lifetime-5.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/regions/region-object-lifetime-5.rs')
-rw-r--r--src/test/ui/regions/region-object-lifetime-5.rs14
1 files changed, 0 insertions, 14 deletions
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<dyn Foo>) -> &'static () {
- x.borrowed() //~ ERROR cannot return reference to local data `*x`
-}
-
-fn main() {}