Skip to content

Commit 1fd9607

Browse files
committed
Allow uses of #[unsafe_destructor_blind_to_params]. Should be ported to #[may_dangle].
See #34761.
1 parent 2a6c6a9 commit 1fd9607

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

src/test/ui/run-pass/issues/issue28498-ugeh-ex1.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
// except according to those terms.
1010

1111
// run-pass
12+
#![allow(deprecated)] // FIXME: switch to `#[may_dangle]` below.
13+
1214
// Example taken from RFC 1238 text
1315

1416
// https://github.com/rust-lang/rfcs/blob/master/text/1238-nonparametric-dropck.md

src/test/ui/run-pass/issues/issue28498-ugeh-with-lifetime-param.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
// except according to those terms.
1010

1111
// run-pass
12+
#![allow(deprecated)] // FIXME: switch to `#[may_dangle]` below.
13+
1214
// Demonstrate the use of the unguarded escape hatch with a lifetime param
1315
// to assert that destructor will not access any dead data.
1416
//

src/test/ui/run-pass/issues/issue28498-ugeh-with-passed-to-fn.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
// except according to those terms.
1010

1111
// run-pass
12+
#![allow(deprecated)] // FIXME: switch to `#[may_dangle]` below.
13+
1214
// Demonstrate the use of the unguarded escape hatch with a type param in negative position
1315
// to assert that destructor will not access any dead data.
1416
//

src/test/ui/run-pass/issues/issue28498-ugeh-with-trait-bound.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
// except according to those terms.
1010

1111
// run-pass
12+
#![allow(deprecated)] // FIXME: switch to `#[may_dangle]` below.
13+
1214
// Demonstrate the use of the unguarded escape hatch with a trait bound
1315
// to assert that destructor will not access any dead data.
1416
//

0 commit comments

Comments
 (0)