diff options
| author | Santiago Pastorino <spastorino@gmail.com> | 2018-06-13 14:51:53 -0300 |
|---|---|---|
| committer | Santiago Pastorino <spastorino@gmail.com> | 2018-06-19 21:21:50 -0300 |
| commit | f4fc43cb20a09e5db76f355596205c48cd8b4615 (patch) | |
| tree | 58f4f53d1d1380eb4d741d4475bd52a370e1e9dc /src/test | |
| parent | f28c7aef7fbff1909c2d0257186cd7a5f0c6aa4b (diff) | |
| download | rust-f4fc43cb20a09e5db76f355596205c48cd8b4615.tar.gz rust-f4fc43cb20a09e5db76f355596205c48cd8b4615.zip | |
Suggest that values are dropped in the opposite order they are defined
Diffstat (limited to 'src/test')
18 files changed, 48 insertions, 0 deletions
diff --git a/src/test/ui/dropck/dropck-eyepatch-extern-crate.nll.stderr b/src/test/ui/dropck/dropck-eyepatch-extern-crate.nll.stderr index 008ecfeabcb..730ace7858b 100644 --- a/src/test/ui/dropck/dropck-eyepatch-extern-crate.nll.stderr +++ b/src/test/ui/dropck/dropck-eyepatch-extern-crate.nll.stderr @@ -9,6 +9,8 @@ LL | } | | | borrowed value only lives until here | borrow later used here, when `dt` 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/dropck/dropck-eyepatch-reorder.nll.stderr b/src/test/ui/dropck/dropck-eyepatch-reorder.nll.stderr index 233ff198af4..f0df7109ba4 100644 --- a/src/test/ui/dropck/dropck-eyepatch-reorder.nll.stderr +++ b/src/test/ui/dropck/dropck-eyepatch-reorder.nll.stderr @@ -9,6 +9,8 @@ LL | } | | | borrowed value only lives until here | borrow later used here, when `dt` 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/dropck/dropck-eyepatch.nll.stderr b/src/test/ui/dropck/dropck-eyepatch.nll.stderr index 7b27ff01f92..2072bc6a756 100644 --- a/src/test/ui/dropck/dropck-eyepatch.nll.stderr +++ b/src/test/ui/dropck/dropck-eyepatch.nll.stderr @@ -9,6 +9,8 @@ LL | } | | | borrowed value only lives until here | borrow later used here, when `dt` 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/error-codes/E0597.nll.stderr b/src/test/ui/error-codes/E0597.nll.stderr index 459de1bc00b..172db9ced82 100644 --- a/src/test/ui/error-codes/E0597.nll.stderr +++ b/src/test/ui/error-codes/E0597.nll.stderr @@ -9,6 +9,8 @@ LL | } | | | borrowed value only lives until here | borrow later used here, when `x` 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/generator/dropck.nll.stderr b/src/test/ui/generator/dropck.nll.stderr index 7b68c167d4a..01a53cdd6dd 100644 --- a/src/test/ui/generator/dropck.nll.stderr +++ b/src/test/ui/generator/dropck.nll.stderr @@ -9,6 +9,8 @@ LL | } | | | borrowed value only lives until here | borrow later used here, when `gen` is dropped + | + = note: values in a scope are dropped in the opposite order they are defined error[E0597]: `ref_` does not live long enough --> $DIR/dropck.rs:22:11 @@ -26,6 +28,8 @@ LL | } | | | borrowed value only lives until here | borrow later used here, when `gen` 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-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 |
