Skip to content

Commit 3ef980a

Browse files
committed
Update expectations of test ui/dropck/dropck_trait_cycle_checked.rs for Polonius
as its output was changed by 2ff337a#diff-bd3f80b956148a5d1567aa8698b8a507
1 parent 222e920 commit 3ef980a

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/test/ui/dropck/dropck_trait_cycle_checked.polonius.stderr

+8-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ LL | }
88
| -
99
| |
1010
| `o2` dropped here while still borrowed
11-
| borrow might be used here, when `o2` is dropped and runs the destructor for type `std::boxed::Box<dyn Obj<'_>>`
11+
| borrow might be used here, when `o1` is dropped and runs the destructor for type `std::boxed::Box<dyn Obj<'_>>`
12+
|
13+
= note: values in a scope are dropped in the opposite order they are defined
1214

1315
error[E0597]: `o3` does not live long enough
1416
--> $DIR/dropck_trait_cycle_checked.rs:112:13
@@ -20,7 +22,9 @@ LL | }
2022
| -
2123
| |
2224
| `o3` dropped here while still borrowed
23-
| borrow might be used here, when `o3` is dropped and runs the destructor for type `std::boxed::Box<dyn Obj<'_>>`
25+
| borrow might be used here, when `o1` is dropped and runs the destructor for type `std::boxed::Box<dyn Obj<'_>>`
26+
|
27+
= note: values in a scope are dropped in the opposite order they are defined
2428

2529
error[E0597]: `o2` does not live long enough
2630
--> $DIR/dropck_trait_cycle_checked.rs:113:13
@@ -38,7 +42,7 @@ error[E0597]: `o3` does not live long enough
3842
--> $DIR/dropck_trait_cycle_checked.rs:114:13
3943
|
4044
LL | let (o1, o2, o3): (Box<dyn Obj>, Box<dyn Obj>, Box<dyn Obj>) = (O::new(), O::new(), O::new());
41-
| -------- cast requires that `o3` is borrowed for `'static`
45+
| -------- cast requires that `o3` is borrowed for `'static`
4246
...
4347
LL | o2.set1(&o3);
4448
| ^^^ borrowed value does not live long enough
@@ -62,7 +66,7 @@ error[E0597]: `o2` does not live long enough
6266
--> $DIR/dropck_trait_cycle_checked.rs:116:13
6367
|
6468
LL | let (o1, o2, o3): (Box<dyn Obj>, Box<dyn Obj>, Box<dyn Obj>) = (O::new(), O::new(), O::new());
65-
| -------- cast requires that `o2` is borrowed for `'static`
69+
| -------- cast requires that `o2` is borrowed for `'static`
6670
...
6771
LL | o3.set1(&o2);
6872
| ^^^ borrowed value does not live long enough

0 commit comments

Comments
 (0)