From f4fc43cb20a09e5db76f355596205c48cd8b4615 Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Wed, 13 Jun 2018 14:51:53 -0300 Subject: Suggest that values are dropped in the opposite order they are defined --- src/test/ui/span/dropck-object-cycle.nll.stderr | 2 ++ src/test/ui/span/dropck_direct_cycle_with_drop.nll.stderr | 4 ++++ src/test/ui/span/dropck_misc_variants.nll.stderr | 4 ++++ .../span/issue-24805-dropck-child-has-items-via-parent.nll.stderr | 2 ++ src/test/ui/span/issue-24805-dropck-trait-has-items.nll.stderr | 6 ++++++ src/test/ui/span/issue-24895-copy-clone-dropck.nll.stderr | 2 ++ src/test/ui/span/issue-26656.nll.stderr | 2 ++ src/test/ui/span/issue28498-reject-ex1.nll.stderr | 2 ++ src/test/ui/span/issue28498-reject-lifetime-param.nll.stderr | 2 ++ src/test/ui/span/issue28498-reject-passed-to-fn.nll.stderr | 2 ++ src/test/ui/span/issue28498-reject-trait-bound.nll.stderr | 2 ++ src/test/ui/span/send-is-not-static-std-sync.nll.stderr | 2 ++ src/test/ui/span/vec_refs_data_with_early_death.nll.stderr | 4 ++++ 13 files changed, 36 insertions(+) (limited to 'src/test/ui/span') diff --git a/src/test/ui/span/dropck-object-cycle.nll.stderr b/src/test/ui/span/dropck-object-cycle.nll.stderr index 64a76399da3..b268f6e3ab0 100644 --- a/src/test/ui/span/dropck-object-cycle.nll.stderr +++ b/src/test/ui/span/dropck-object-cycle.nll.stderr @@ -9,6 +9,8 @@ LL | } | | | borrowed value only lives until here | borrow later used here, when `m` is dropped + | + = note: values in a scope are dropped in the opposite order they are defined error: aborting due to previous error diff --git a/src/test/ui/span/dropck_direct_cycle_with_drop.nll.stderr b/src/test/ui/span/dropck_direct_cycle_with_drop.nll.stderr index 2a8ef24307d..86a4f0e13b5 100644 --- a/src/test/ui/span/dropck_direct_cycle_with_drop.nll.stderr +++ b/src/test/ui/span/dropck_direct_cycle_with_drop.nll.stderr @@ -9,6 +9,8 @@ LL | } | | | borrowed value only lives until here | borrow later used here, when `d1` is dropped + | + = note: values in a scope are dropped in the opposite order they are defined error[E0597]: `d2` does not live long enough --> $DIR/dropck_direct_cycle_with_drop.rs:46:19 @@ -21,6 +23,8 @@ LL | } | | | borrowed value only lives until here | borrow later used here, when `d1` is dropped + | + = note: values in a scope are dropped in the opposite order they are defined error: aborting due to 2 previous errors diff --git a/src/test/ui/span/dropck_misc_variants.nll.stderr b/src/test/ui/span/dropck_misc_variants.nll.stderr index 0eeec8e51be..0eb84e4a7d0 100644 --- a/src/test/ui/span/dropck_misc_variants.nll.stderr +++ b/src/test/ui/span/dropck_misc_variants.nll.stderr @@ -8,6 +8,8 @@ LL | } | | | borrowed value only lives until here | borrow later used here, when `_w` is dropped + | + = note: values in a scope are dropped in the opposite order they are defined error[E0597]: `v` does not live long enough --> $DIR/dropck_misc_variants.rs:41:27 @@ -20,6 +22,8 @@ LL | } | | | borrowed value only lives until here | borrow later used here, when `_w` is dropped + | + = note: values in a scope are dropped in the opposite order they are defined error: aborting due to 2 previous errors diff --git a/src/test/ui/span/issue-24805-dropck-child-has-items-via-parent.nll.stderr b/src/test/ui/span/issue-24805-dropck-child-has-items-via-parent.nll.stderr index 3f18f4d025a..ec1df8aeca1 100644 --- a/src/test/ui/span/issue-24805-dropck-child-has-items-via-parent.nll.stderr +++ b/src/test/ui/span/issue-24805-dropck-child-has-items-via-parent.nll.stderr @@ -9,6 +9,8 @@ LL | } | | | borrowed value only lives until here | borrow later used here, when `_d` is dropped + | + = note: values in a scope are dropped in the opposite order they are defined error: aborting due to previous error diff --git a/src/test/ui/span/issue-24805-dropck-trait-has-items.nll.stderr b/src/test/ui/span/issue-24805-dropck-trait-has-items.nll.stderr index 79e607bb392..288c196b27b 100644 --- a/src/test/ui/span/issue-24805-dropck-trait-has-items.nll.stderr +++ b/src/test/ui/span/issue-24805-dropck-trait-has-items.nll.stderr @@ -8,6 +8,8 @@ LL | } | | | borrowed value only lives until here | borrow later used here, when `_d` is dropped + | + = note: values in a scope are dropped in the opposite order they are defined error[E0597]: `d1` does not live long enough --> $DIR/issue-24805-dropck-trait-has-items.rs:53:33 @@ -19,6 +21,8 @@ LL | } | | | borrowed value only lives until here | borrow later used here, when `_d` is dropped + | + = note: values in a scope are dropped in the opposite order they are defined error[E0597]: `d1` does not live long enough --> $DIR/issue-24805-dropck-trait-has-items.rs:59:20 @@ -30,6 +34,8 @@ LL | } | | | borrowed value only lives until here | borrow later used here, when `_d` is dropped + | + = note: values in a scope are dropped in the opposite order they are defined error: aborting due to 3 previous errors diff --git a/src/test/ui/span/issue-24895-copy-clone-dropck.nll.stderr b/src/test/ui/span/issue-24895-copy-clone-dropck.nll.stderr index 550f9d8b60d..c89e68bcd0a 100644 --- a/src/test/ui/span/issue-24895-copy-clone-dropck.nll.stderr +++ b/src/test/ui/span/issue-24895-copy-clone-dropck.nll.stderr @@ -8,6 +8,8 @@ LL | } | | | borrowed value only lives until here | borrow later used here, when `d2` is dropped + | + = note: values in a scope are dropped in the opposite order they are defined error: aborting due to previous error diff --git a/src/test/ui/span/issue-26656.nll.stderr b/src/test/ui/span/issue-26656.nll.stderr index 64bb83fc782..bea6dc6b3f6 100644 --- a/src/test/ui/span/issue-26656.nll.stderr +++ b/src/test/ui/span/issue-26656.nll.stderr @@ -8,6 +8,8 @@ LL | } | | | borrowed value only lives until here | borrow later used here, when `zook` is dropped + | + = note: values in a scope are dropped in the opposite order they are defined error: aborting due to previous error diff --git a/src/test/ui/span/issue28498-reject-ex1.nll.stderr b/src/test/ui/span/issue28498-reject-ex1.nll.stderr index c5e7a93c763..3ed13f2653c 100644 --- a/src/test/ui/span/issue28498-reject-ex1.nll.stderr +++ b/src/test/ui/span/issue28498-reject-ex1.nll.stderr @@ -9,6 +9,8 @@ LL | } | | | borrowed value only lives until here | borrow later used here, when `foo` is dropped + | + = note: values in a scope are dropped in the opposite order they are defined error: aborting due to previous error diff --git a/src/test/ui/span/issue28498-reject-lifetime-param.nll.stderr b/src/test/ui/span/issue28498-reject-lifetime-param.nll.stderr index 25708219bd1..ce9e75b4483 100644 --- a/src/test/ui/span/issue28498-reject-lifetime-param.nll.stderr +++ b/src/test/ui/span/issue28498-reject-lifetime-param.nll.stderr @@ -9,6 +9,8 @@ LL | } | | | borrowed value only lives until here | borrow later used here, when `foo1` is dropped + | + = note: values in a scope are dropped in the opposite order they are defined error: aborting due to previous error diff --git a/src/test/ui/span/issue28498-reject-passed-to-fn.nll.stderr b/src/test/ui/span/issue28498-reject-passed-to-fn.nll.stderr index 66157096394..fcdc1c3f945 100644 --- a/src/test/ui/span/issue28498-reject-passed-to-fn.nll.stderr +++ b/src/test/ui/span/issue28498-reject-passed-to-fn.nll.stderr @@ -9,6 +9,8 @@ LL | } | | | borrowed value only lives until here | borrow later used here, when `foo1` is dropped + | + = note: values in a scope are dropped in the opposite order they are defined error: aborting due to previous error diff --git a/src/test/ui/span/issue28498-reject-trait-bound.nll.stderr b/src/test/ui/span/issue28498-reject-trait-bound.nll.stderr index bb9d67983de..6300bb3eacd 100644 --- a/src/test/ui/span/issue28498-reject-trait-bound.nll.stderr +++ b/src/test/ui/span/issue28498-reject-trait-bound.nll.stderr @@ -9,6 +9,8 @@ LL | } | | | borrowed value only lives until here | borrow later used here, when `foo1` is dropped + | + = note: values in a scope are dropped in the opposite order they are defined error: aborting due to previous error diff --git a/src/test/ui/span/send-is-not-static-std-sync.nll.stderr b/src/test/ui/span/send-is-not-static-std-sync.nll.stderr index d411f0d26f4..6ebbf3e1ec4 100644 --- a/src/test/ui/span/send-is-not-static-std-sync.nll.stderr +++ b/src/test/ui/span/send-is-not-static-std-sync.nll.stderr @@ -63,6 +63,8 @@ LL | } ... LL | } | - borrow later used here, when `tx` is dropped + | + = note: values in a scope are dropped in the opposite order they are defined error: aborting due to 6 previous errors diff --git a/src/test/ui/span/vec_refs_data_with_early_death.nll.stderr b/src/test/ui/span/vec_refs_data_with_early_death.nll.stderr index 6074199b89a..9d89fac08ff 100644 --- a/src/test/ui/span/vec_refs_data_with_early_death.nll.stderr +++ b/src/test/ui/span/vec_refs_data_with_early_death.nll.stderr @@ -9,6 +9,8 @@ LL | } | | | borrowed value only lives until here | borrow later used here, when `v` is dropped + | + = note: values in a scope are dropped in the opposite order they are defined error[E0597]: `x` does not live long enough --> $DIR/vec_refs_data_with_early_death.rs:27:12 @@ -21,6 +23,8 @@ LL | } | | | borrowed value only lives until here | borrow later used here, when `v` is dropped + | + = note: values in a scope are dropped in the opposite order they are defined error: aborting due to 2 previous errors -- cgit 1.4.1-3-g733a5