Skip to content

Commit 09aa09f

Browse files
committed
Enable drop-tracking tests behind -Zdrop-tracking
These were still disabled from the soft revert of drop tracking, which meant we were not catching regressions that were introduced while trying to fix drop tracking.
1 parent 3f73491 commit 09aa09f

7 files changed

+22
-38
lines changed

src/test/ui/async-await/async-fn-nonsend.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
// edition:2018
2-
// compile-flags: --crate-type lib
3-
4-
// FIXME(eholk): temporarily disabled while drop range tracking is disabled
5-
// (see generator_interior.rs:27)
6-
// ignore-test
2+
// compile-flags: --crate-type lib -Zdrop-tracking
73

84
use std::{cell::RefCell, fmt::Debug, rc::Rc};
95

src/test/ui/async-await/unresolved_type_param.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22
// Error message should pinpoint the type parameter T as needing to be bound
33
// (rather than give a general error message)
44
// edition:2018
5-
6-
// FIXME(eholk): temporarily disabled while drop range tracking is disabled
7-
// (see generator_interior.rs:27)
8-
// ignore-test
5+
// compile-flags: -Zdrop-tracking
96

107
async fn bar<T>() -> () {}
118

src/test/ui/async-await/unresolved_type_param.stderr

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
error[E0698]: type inside `async fn` body must be known in this context
2-
--> $DIR/unresolved_type_param.rs:9:5
2+
--> $DIR/unresolved_type_param.rs:10:5
33
|
44
LL | bar().await;
55
| ^^^ cannot infer type for type parameter `T` declared on the function `bar`
66
|
77
note: the type is part of the `async fn` body because of this `await`
8-
--> $DIR/unresolved_type_param.rs:9:10
8+
--> $DIR/unresolved_type_param.rs:10:10
99
|
1010
LL | bar().await;
1111
| ^^^^^^
1212

1313
error[E0698]: type inside `async fn` body must be known in this context
14-
--> $DIR/unresolved_type_param.rs:9:5
14+
--> $DIR/unresolved_type_param.rs:10:5
1515
|
1616
LL | bar().await;
1717
| ^^^ cannot infer type for type parameter `T` declared on the function `bar`
1818
|
1919
note: the type is part of the `async fn` body because of this `await`
20-
--> $DIR/unresolved_type_param.rs:9:10
20+
--> $DIR/unresolved_type_param.rs:10:10
2121
|
2222
LL | bar().await;
2323
| ^^^^^^
2424

2525
error[E0698]: type inside `async fn` body must be known in this context
26-
--> $DIR/unresolved_type_param.rs:9:5
26+
--> $DIR/unresolved_type_param.rs:10:5
2727
|
2828
LL | bar().await;
2929
| ^^^ cannot infer type for type parameter `T` declared on the function `bar`
3030
|
3131
note: the type is part of the `async fn` body because of this `await`
32-
--> $DIR/unresolved_type_param.rs:9:10
32+
--> $DIR/unresolved_type_param.rs:10:10
3333
|
3434
LL | bar().await;
3535
| ^^^^^^

src/test/ui/generator/drop-control-flow.rs

-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
// build-pass
22
// compile-flags: -Zdrop-tracking
33

4-
// FIXME(eholk): temporarily disabled while drop range tracking is disabled
5-
// (see generator_interior.rs:27)
6-
// ignore-test
7-
84
// A test to ensure generators capture values that were conditionally dropped,
95
// and also that values that are dropped along all paths to a yield do not get
106
// included in the generator type.

src/test/ui/generator/issue-57478.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
// check-pass
2-
3-
// FIXME(eholk): temporarily disabled while drop range tracking is disabled
4-
// (see generator_interior.rs:27)
5-
// ignore-test
2+
// compile-flags: -Zdrop-tracking
63

74
#![feature(negative_impls, generators)]
85

src/test/ui/generator/partial-drop.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
// FIXME(eholk): temporarily disabled while drop range tracking is disabled
2-
// (see generator_interior.rs:27)
3-
// ignore-test
1+
// compile-flags: -Zdrop-tracking
42

53
#![feature(negative_impls, generators)]
64

src/test/ui/generator/partial-drop.stderr

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
error: generator cannot be sent between threads safely
2-
--> $DIR/partial-drop.rs:12:5
2+
--> $DIR/partial-drop.rs:14:5
33
|
44
LL | assert_send(|| {
55
| ^^^^^^^^^^^ generator is not `Send`
66
|
7-
= help: within `[generator@$DIR/partial-drop.rs:12:17: 18:6]`, the trait `Send` is not implemented for `Foo`
7+
= help: within `[generator@$DIR/partial-drop.rs:14:17: 20:6]`, the trait `Send` is not implemented for `Foo`
88
note: generator is not `Send` as this value is used across a yield
9-
--> $DIR/partial-drop.rs:17:9
9+
--> $DIR/partial-drop.rs:19:9
1010
|
1111
LL | let guard = Bar { foo: Foo, x: 42 };
1212
| ----- has type `Bar` which is not `Send`
@@ -16,20 +16,20 @@ LL | yield;
1616
LL | });
1717
| - `guard` is later dropped here
1818
note: required by a bound in `assert_send`
19-
--> $DIR/partial-drop.rs:40:19
19+
--> $DIR/partial-drop.rs:42:19
2020
|
2121
LL | fn assert_send<T: Send>(_: T) {}
2222
| ^^^^ required by this bound in `assert_send`
2323

2424
error: generator cannot be sent between threads safely
25-
--> $DIR/partial-drop.rs:20:5
25+
--> $DIR/partial-drop.rs:22:5
2626
|
2727
LL | assert_send(|| {
2828
| ^^^^^^^^^^^ generator is not `Send`
2929
|
30-
= help: within `[generator@$DIR/partial-drop.rs:20:17: 28:6]`, the trait `Send` is not implemented for `Foo`
30+
= help: within `[generator@$DIR/partial-drop.rs:22:17: 30:6]`, the trait `Send` is not implemented for `Foo`
3131
note: generator is not `Send` as this value is used across a yield
32-
--> $DIR/partial-drop.rs:27:9
32+
--> $DIR/partial-drop.rs:29:9
3333
|
3434
LL | let guard = Bar { foo: Foo, x: 42 };
3535
| ----- has type `Bar` which is not `Send`
@@ -39,20 +39,20 @@ LL | yield;
3939
LL | });
4040
| - `guard` is later dropped here
4141
note: required by a bound in `assert_send`
42-
--> $DIR/partial-drop.rs:40:19
42+
--> $DIR/partial-drop.rs:42:19
4343
|
4444
LL | fn assert_send<T: Send>(_: T) {}
4545
| ^^^^ required by this bound in `assert_send`
4646

4747
error: generator cannot be sent between threads safely
48-
--> $DIR/partial-drop.rs:30:5
48+
--> $DIR/partial-drop.rs:32:5
4949
|
5050
LL | assert_send(|| {
5151
| ^^^^^^^^^^^ generator is not `Send`
5252
|
53-
= help: within `[generator@$DIR/partial-drop.rs:30:17: 37:6]`, the trait `Send` is not implemented for `Foo`
53+
= help: within `[generator@$DIR/partial-drop.rs:32:17: 39:6]`, the trait `Send` is not implemented for `Foo`
5454
note: generator is not `Send` as this value is used across a yield
55-
--> $DIR/partial-drop.rs:36:9
55+
--> $DIR/partial-drop.rs:38:9
5656
|
5757
LL | let guard = Bar { foo: Foo, x: 42 };
5858
| ----- has type `Bar` which is not `Send`
@@ -62,7 +62,7 @@ LL | yield;
6262
LL | });
6363
| - `guard` is later dropped here
6464
note: required by a bound in `assert_send`
65-
--> $DIR/partial-drop.rs:40:19
65+
--> $DIR/partial-drop.rs:42:19
6666
|
6767
LL | fn assert_send<T: Send>(_: T) {}
6868
| ^^^^ required by this bound in `assert_send`

0 commit comments

Comments
 (0)