From 31657c99533f7c5dc44229c709a2ce6ad24908db Mon Sep 17 00:00:00 2001 From: David Wood Date: Thu, 9 Aug 2018 12:03:20 +0200 Subject: [PATCH] Updated tests after rebase. --- .../ex2b-push-no-existing-names.nll.stderr | 6 +++--- .../ex3-both-anon-regions-both-are-structs-2.nll.stderr | 6 +++--- .../ex3-both-anon-regions-both-are-structs-3.nll.stderr | 8 ++++---- .../ex3-both-anon-regions-both-are-structs-4.nll.stderr | 8 ++++---- .../ex3-both-anon-regions-both-are-structs.nll.stderr | 6 +++--- .../ex3-both-anon-regions-one-is-struct-2.nll.stderr | 6 +++--- .../ex3-both-anon-regions-one-is-struct-3.nll.stderr | 6 +++--- .../ex3-both-anon-regions-one-is-struct-4.nll.stderr | 6 +++--- .../ex3-both-anon-regions-one-is-struct.nll.stderr | 6 +++--- src/test/ui/nll/issue-52742.rs | 1 + src/test/ui/nll/issue-52742.stderr | 2 +- 11 files changed, 31 insertions(+), 30 deletions(-) diff --git a/src/test/ui/lifetime-errors/ex2b-push-no-existing-names.nll.stderr b/src/test/ui/lifetime-errors/ex2b-push-no-existing-names.nll.stderr index 614034794bd6..b7c252cac9bc 100644 --- a/src/test/ui/lifetime-errors/ex2b-push-no-existing-names.nll.stderr +++ b/src/test/ui/lifetime-errors/ex2b-push-no-existing-names.nll.stderr @@ -8,9 +8,9 @@ error: unsatisfied lifetime constraints --> $DIR/ex2b-push-no-existing-names.rs:16:5 | LL | fn foo(x: &mut Vec>, y: Ref) { - | -------- -------- lifetime `'1` appears in this type - | | - | lifetime `'2` appears in this type + | - - has type `Ref<'1, i32>` + | | + | has type `&mut std::vec::Vec>` LL | x.push(y); //~ ERROR lifetime mismatch | ^^^^^^^^^ argument requires that `'1` must outlive `'2` diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.nll.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.nll.stderr index 2829fbcd32a1..618817fd57b3 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.nll.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.nll.stderr @@ -8,9 +8,9 @@ error: unsatisfied lifetime constraints --> $DIR/ex3-both-anon-regions-both-are-structs-2.rs:16:5 | LL | fn foo(mut x: Ref, y: Ref) { - | --- --- lifetime `'1` appears in this type - | | - | lifetime `'2` appears in this type + | ----- - has type `Ref<'_, '1>` + | | + | has type `Ref<'_, '2>` LL | x.b = y.b; //~ ERROR lifetime mismatch | ^^^^^^^^^ requires that `'1` must outlive `'2` diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.nll.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.nll.stderr index 8171ee758b06..b4767afd4138 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.nll.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.nll.stderr @@ -8,10 +8,10 @@ error: unsatisfied lifetime constraints --> $DIR/ex3-both-anon-regions-both-are-structs-3.rs:16:5 | LL | fn foo(mut x: Ref) { - | --- - | | - | lifetime `'1` appears in this type - | lifetime `'2` appears in this type + | ----- + | | + | has type `Ref<'_, '1>` + | has type `Ref<'2, '_>` LL | x.a = x.b; //~ ERROR lifetime mismatch | ^^^^^^^^^ requires that `'1` must outlive `'2` diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-4.nll.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-4.nll.stderr index 99b64605baec..e2fcbaa4c3c5 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-4.nll.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs-4.nll.stderr @@ -8,10 +8,10 @@ error: unsatisfied lifetime constraints --> $DIR/ex3-both-anon-regions-both-are-structs-4.rs:16:5 | LL | fn foo(mut x: Ref) { - | --- - | | - | lifetime `'1` appears in this type - | lifetime `'2` appears in this type + | ----- + | | + | has type `Ref<'_, '1>` + | has type `Ref<'2, '_>` LL | x.a = x.b; //~ ERROR lifetime mismatch | ^^^^^^^^^ requires that `'1` must outlive `'2` diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs.nll.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs.nll.stderr index c9542d310697..79f1a8c0ccf7 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs.nll.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-both-are-structs.nll.stderr @@ -8,9 +8,9 @@ error: unsatisfied lifetime constraints --> $DIR/ex3-both-anon-regions-both-are-structs.rs:15:5 | LL | fn foo(mut x: Vec, y: Ref) { - | --- --- lifetime `'1` appears in this type - | | - | lifetime `'2` appears in this type + | ----- - has type `Ref<'1>` + | | + | has type `std::vec::Vec>` LL | x.push(y); //~ ERROR lifetime mismatch | ^^^^^^^^^ argument requires that `'1` must outlive `'2` diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.nll.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.nll.stderr index 459796760e1b..0bacd894e6e9 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.nll.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.nll.stderr @@ -8,9 +8,9 @@ error: unsatisfied lifetime constraints --> $DIR/ex3-both-anon-regions-one-is-struct-2.rs:14:5 | LL | fn foo(mut x: Ref, y: &u32) { - | --- - let's call the lifetime of this reference `'2` - | | - | lifetime `'1` appears in this type + | ----- - let's call the lifetime of this reference `'2` + | | + | has type `Ref<'_, '1>` LL | y = x.b; //~ ERROR lifetime mismatch | ^^^^^^^ requires that `'1` must outlive `'2` diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.nll.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.nll.stderr index 5fc1755ed390..f40c67b8d114 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.nll.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.nll.stderr @@ -8,9 +8,9 @@ error: unsatisfied lifetime constraints --> $DIR/ex3-both-anon-regions-one-is-struct-3.rs:14:5 | LL | fn foo(mut y: Ref, x: &u32) { - | --- - let's call the lifetime of this reference `'1` - | | - | lifetime `'2` appears in this type + | ----- - let's call the lifetime of this reference `'1` + | | + | has type `Ref<'_, '2>` LL | y.b = x; //~ ERROR lifetime mismatch | ^^^^^^^ requires that `'1` must outlive `'2` diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.nll.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.nll.stderr index 835f95880a74..f9168dcf5837 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.nll.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.nll.stderr @@ -8,9 +8,9 @@ error: unsatisfied lifetime constraints --> $DIR/ex3-both-anon-regions-one-is-struct-4.rs:14:5 | LL | fn foo(mut y: Ref, x: &u32) { - | --- - let's call the lifetime of this reference `'1` - | | - | lifetime `'2` appears in this type + | ----- - let's call the lifetime of this reference `'1` + | | + | has type `Ref<'_, '2>` LL | y.b = x; //~ ERROR lifetime mismatch | ^^^^^^^ requires that `'1` must outlive `'2` diff --git a/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct.nll.stderr b/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct.nll.stderr index 7aed5fe626f0..c43f84772324 100644 --- a/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct.nll.stderr +++ b/src/test/ui/lifetime-errors/ex3-both-anon-regions-one-is-struct.nll.stderr @@ -8,9 +8,9 @@ error: unsatisfied lifetime constraints --> $DIR/ex3-both-anon-regions-one-is-struct.rs:17:5 | LL | fn foo(mut x: Ref, y: &u32) { - | --- - let's call the lifetime of this reference `'1` - | | - | lifetime `'2` appears in this type + | ----- - let's call the lifetime of this reference `'1` + | | + | has type `Ref<'_, '2>` LL | x.b = y; //~ ERROR lifetime mismatch | ^^^^^^^ requires that `'1` must outlive `'2` diff --git a/src/test/ui/nll/issue-52742.rs b/src/test/ui/nll/issue-52742.rs index 84d06a1d20aa..c36e4cc70fd5 100644 --- a/src/test/ui/nll/issue-52742.rs +++ b/src/test/ui/nll/issue-52742.rs @@ -10,6 +10,7 @@ #![feature(nll)] #![feature(in_band_lifetimes)] +#![feature(impl_header_lifetime_elision)] struct Foo<'a, 'b> { x: &'a u32, diff --git a/src/test/ui/nll/issue-52742.stderr b/src/test/ui/nll/issue-52742.stderr index d1b830b9dfc2..515ba55cf6f5 100644 --- a/src/test/ui/nll/issue-52742.stderr +++ b/src/test/ui/nll/issue-52742.stderr @@ -1,5 +1,5 @@ error: unsatisfied lifetime constraints - --> $DIR/issue-52742.rs:25:9 + --> $DIR/issue-52742.rs:26:9 | LL | fn take_bar(&mut self, b: Bar<'_>) { | --------- -- let's call this `'1`