From 18a77ae4ab3176fdcc57f165740449ebc81a1cf2 Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Fri, 31 Aug 2018 15:29:46 +0200 Subject: [PATCH] Allow uses of `#[unsafe_destructor_blind_to_params]`. Should be ported to `#[may_dangle]`. See rust-lang/rust#34761. --- src/test/ui/run-pass/issues/issue28498-ugeh-ex1.rs | 2 ++ .../ui/run-pass/issues/issue28498-ugeh-with-lifetime-param.rs | 2 ++ .../ui/run-pass/issues/issue28498-ugeh-with-passed-to-fn.rs | 2 ++ src/test/ui/run-pass/issues/issue28498-ugeh-with-trait-bound.rs | 2 ++ 4 files changed, 8 insertions(+) diff --git a/src/test/ui/run-pass/issues/issue28498-ugeh-ex1.rs b/src/test/ui/run-pass/issues/issue28498-ugeh-ex1.rs index d566b2ab113..50baa2975dd 100644 --- a/src/test/ui/run-pass/issues/issue28498-ugeh-ex1.rs +++ b/src/test/ui/run-pass/issues/issue28498-ugeh-ex1.rs @@ -9,6 +9,8 @@ // except according to those terms. // run-pass +#![allow(deprecated)] // FIXME: switch to `#[may_dangle]` below. + // Example taken from RFC 1238 text // https://github.com/rust-lang/rfcs/blob/master/text/1238-nonparametric-dropck.md diff --git a/src/test/ui/run-pass/issues/issue28498-ugeh-with-lifetime-param.rs b/src/test/ui/run-pass/issues/issue28498-ugeh-with-lifetime-param.rs index 72e1317cce9..0fff6507833 100644 --- a/src/test/ui/run-pass/issues/issue28498-ugeh-with-lifetime-param.rs +++ b/src/test/ui/run-pass/issues/issue28498-ugeh-with-lifetime-param.rs @@ -9,6 +9,8 @@ // except according to those terms. // run-pass +#![allow(deprecated)] // FIXME: switch to `#[may_dangle]` below. + // Demonstrate the use of the unguarded escape hatch with a lifetime param // to assert that destructor will not access any dead data. // diff --git a/src/test/ui/run-pass/issues/issue28498-ugeh-with-passed-to-fn.rs b/src/test/ui/run-pass/issues/issue28498-ugeh-with-passed-to-fn.rs index 113994227e6..28645801db2 100644 --- a/src/test/ui/run-pass/issues/issue28498-ugeh-with-passed-to-fn.rs +++ b/src/test/ui/run-pass/issues/issue28498-ugeh-with-passed-to-fn.rs @@ -9,6 +9,8 @@ // except according to those terms. // run-pass +#![allow(deprecated)] // FIXME: switch to `#[may_dangle]` below. + // Demonstrate the use of the unguarded escape hatch with a type param in negative position // to assert that destructor will not access any dead data. // diff --git a/src/test/ui/run-pass/issues/issue28498-ugeh-with-trait-bound.rs b/src/test/ui/run-pass/issues/issue28498-ugeh-with-trait-bound.rs index c7677992833..7df3ceb7614 100644 --- a/src/test/ui/run-pass/issues/issue28498-ugeh-with-trait-bound.rs +++ b/src/test/ui/run-pass/issues/issue28498-ugeh-with-trait-bound.rs @@ -9,6 +9,8 @@ // except according to those terms. // run-pass +#![allow(deprecated)] // FIXME: switch to `#[may_dangle]` below. + // Demonstrate the use of the unguarded escape hatch with a trait bound // to assert that destructor will not access any dead data. //