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.
This commit is contained in:
Eric Holk 2022-02-28 12:55:50 -08:00
parent 3f73491589
commit 09aa09f1f7
7 changed files with 22 additions and 38 deletions

View File

@ -1,9 +1,5 @@
// edition:2018
// compile-flags: --crate-type lib
// FIXME(eholk): temporarily disabled while drop range tracking is disabled
// (see generator_interior.rs:27)
// ignore-test
// compile-flags: --crate-type lib -Zdrop-tracking
use std::{cell::RefCell, fmt::Debug, rc::Rc};

View File

@ -2,10 +2,7 @@
// Error message should pinpoint the type parameter T as needing to be bound
// (rather than give a general error message)
// edition:2018
// FIXME(eholk): temporarily disabled while drop range tracking is disabled
// (see generator_interior.rs:27)
// ignore-test
// compile-flags: -Zdrop-tracking
async fn bar<T>() -> () {}

View File

@ -1,35 +1,35 @@
error[E0698]: type inside `async fn` body must be known in this context
--> $DIR/unresolved_type_param.rs:9:5
--> $DIR/unresolved_type_param.rs:10:5
|
LL | bar().await;
| ^^^ cannot infer type for type parameter `T` declared on the function `bar`
|
note: the type is part of the `async fn` body because of this `await`
--> $DIR/unresolved_type_param.rs:9:10
--> $DIR/unresolved_type_param.rs:10:10
|
LL | bar().await;
| ^^^^^^
error[E0698]: type inside `async fn` body must be known in this context
--> $DIR/unresolved_type_param.rs:9:5
--> $DIR/unresolved_type_param.rs:10:5
|
LL | bar().await;
| ^^^ cannot infer type for type parameter `T` declared on the function `bar`
|
note: the type is part of the `async fn` body because of this `await`
--> $DIR/unresolved_type_param.rs:9:10
--> $DIR/unresolved_type_param.rs:10:10
|
LL | bar().await;
| ^^^^^^
error[E0698]: type inside `async fn` body must be known in this context
--> $DIR/unresolved_type_param.rs:9:5
--> $DIR/unresolved_type_param.rs:10:5
|
LL | bar().await;
| ^^^ cannot infer type for type parameter `T` declared on the function `bar`
|
note: the type is part of the `async fn` body because of this `await`
--> $DIR/unresolved_type_param.rs:9:10
--> $DIR/unresolved_type_param.rs:10:10
|
LL | bar().await;
| ^^^^^^

View File

@ -1,10 +1,6 @@
// build-pass
// compile-flags: -Zdrop-tracking
// FIXME(eholk): temporarily disabled while drop range tracking is disabled
// (see generator_interior.rs:27)
// ignore-test
// A test to ensure generators capture values that were conditionally dropped,
// and also that values that are dropped along all paths to a yield do not get
// included in the generator type.

View File

@ -1,8 +1,5 @@
// check-pass
// FIXME(eholk): temporarily disabled while drop range tracking is disabled
// (see generator_interior.rs:27)
// ignore-test
// compile-flags: -Zdrop-tracking
#![feature(negative_impls, generators)]

View File

@ -1,6 +1,4 @@
// FIXME(eholk): temporarily disabled while drop range tracking is disabled
// (see generator_interior.rs:27)
// ignore-test
// compile-flags: -Zdrop-tracking
#![feature(negative_impls, generators)]

View File

@ -1,12 +1,12 @@
error: generator cannot be sent between threads safely
--> $DIR/partial-drop.rs:12:5
--> $DIR/partial-drop.rs:14:5
|
LL | assert_send(|| {
| ^^^^^^^^^^^ generator is not `Send`
|
= help: within `[generator@$DIR/partial-drop.rs:12:17: 18:6]`, the trait `Send` is not implemented for `Foo`
= help: within `[generator@$DIR/partial-drop.rs:14:17: 20:6]`, the trait `Send` is not implemented for `Foo`
note: generator is not `Send` as this value is used across a yield
--> $DIR/partial-drop.rs:17:9
--> $DIR/partial-drop.rs:19:9
|
LL | let guard = Bar { foo: Foo, x: 42 };
| ----- has type `Bar` which is not `Send`
@ -16,20 +16,20 @@ LL | yield;
LL | });
| - `guard` is later dropped here
note: required by a bound in `assert_send`
--> $DIR/partial-drop.rs:40:19
--> $DIR/partial-drop.rs:42:19
|
LL | fn assert_send<T: Send>(_: T) {}
| ^^^^ required by this bound in `assert_send`
error: generator cannot be sent between threads safely
--> $DIR/partial-drop.rs:20:5
--> $DIR/partial-drop.rs:22:5
|
LL | assert_send(|| {
| ^^^^^^^^^^^ generator is not `Send`
|
= help: within `[generator@$DIR/partial-drop.rs:20:17: 28:6]`, the trait `Send` is not implemented for `Foo`
= help: within `[generator@$DIR/partial-drop.rs:22:17: 30:6]`, the trait `Send` is not implemented for `Foo`
note: generator is not `Send` as this value is used across a yield
--> $DIR/partial-drop.rs:27:9
--> $DIR/partial-drop.rs:29:9
|
LL | let guard = Bar { foo: Foo, x: 42 };
| ----- has type `Bar` which is not `Send`
@ -39,20 +39,20 @@ LL | yield;
LL | });
| - `guard` is later dropped here
note: required by a bound in `assert_send`
--> $DIR/partial-drop.rs:40:19
--> $DIR/partial-drop.rs:42:19
|
LL | fn assert_send<T: Send>(_: T) {}
| ^^^^ required by this bound in `assert_send`
error: generator cannot be sent between threads safely
--> $DIR/partial-drop.rs:30:5
--> $DIR/partial-drop.rs:32:5
|
LL | assert_send(|| {
| ^^^^^^^^^^^ generator is not `Send`
|
= help: within `[generator@$DIR/partial-drop.rs:30:17: 37:6]`, the trait `Send` is not implemented for `Foo`
= help: within `[generator@$DIR/partial-drop.rs:32:17: 39:6]`, the trait `Send` is not implemented for `Foo`
note: generator is not `Send` as this value is used across a yield
--> $DIR/partial-drop.rs:36:9
--> $DIR/partial-drop.rs:38:9
|
LL | let guard = Bar { foo: Foo, x: 42 };
| ----- has type `Bar` which is not `Send`
@ -62,7 +62,7 @@ LL | yield;
LL | });
| - `guard` is later dropped here
note: required by a bound in `assert_send`
--> $DIR/partial-drop.rs:40:19
--> $DIR/partial-drop.rs:42:19
|
LL | fn assert_send<T: Send>(_: T) {}
| ^^^^ required by this bound in `assert_send`