From 5d44bebb32b12687638a93cde551ee8919c305c1 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Mon, 17 Jun 2019 11:38:38 -0400 Subject: [PATCH] bless test output --- .../ui/impl-trait/multiple-lifetimes/error-handling.rs | 2 +- .../ui/impl-trait/multiple-lifetimes/error-handling.stderr | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/test/ui/impl-trait/multiple-lifetimes/error-handling.rs b/src/test/ui/impl-trait/multiple-lifetimes/error-handling.rs index b4cbf0ba8ed..06122184634 100644 --- a/src/test/ui/impl-trait/multiple-lifetimes/error-handling.rs +++ b/src/test/ui/impl-trait/multiple-lifetimes/error-handling.rs @@ -8,9 +8,9 @@ struct CopyIfEq(T, U); impl Copy for CopyIfEq {} existential type E<'a, 'b>: Sized; -//~^ ERROR lifetime may not live long enough fn foo<'a, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> { + //~^ ERROR lifetime may not live long enough let v = CopyIfEq::<*mut _, *mut _>(&mut {x}, &mut y); let u = v; let _: *mut &'a i32 = u.1; diff --git a/src/test/ui/impl-trait/multiple-lifetimes/error-handling.stderr b/src/test/ui/impl-trait/multiple-lifetimes/error-handling.stderr index f42ec5b62f1..8355399506d 100644 --- a/src/test/ui/impl-trait/multiple-lifetimes/error-handling.stderr +++ b/src/test/ui/impl-trait/multiple-lifetimes/error-handling.stderr @@ -1,11 +1,8 @@ error: lifetime may not live long enough - --> $DIR/error-handling.rs:10:1 + --> $DIR/error-handling.rs:12:56 | -LL | existential type E<'a, 'b>: Sized; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ opaque type requires that `'a` must outlive `'static` -... LL | fn foo<'a, 'b, 'c>(x: &'static i32, mut y: &'a i32) -> E<'b, 'c> { - | -- lifetime `'a` defined here + | -- lifetime `'a` defined here ^^^^^^^^^ opaque type requires that `'a` must outlive `'static` help: to allow this `impl Trait` to capture borrowed data with lifetime `'a`, add `'a` as a constraint | LL | existential type E<'a, 'b>: Sized; + 'a