diff --git a/library/core/src/marker.rs b/library/core/src/marker.rs index 68011310d2cad..fe94aba4ebe0d 100644 --- a/library/core/src/marker.rs +++ b/library/core/src/marker.rs @@ -1125,7 +1125,6 @@ pub trait FnPtr: Copy + Clone { /// /// By using the macro, the following example will compile: /// ``` -/// #![feature(derive_coerce_pointee)] /// use std::marker::CoercePointee; /// use std::ops::Deref; /// @@ -1172,7 +1171,7 @@ pub trait FnPtr: Copy + Clone { /// type as a receiver are dyn-compatible. For example, this compiles: /// /// ``` -/// #![feature(arbitrary_self_types, derive_coerce_pointee)] +/// #![feature(arbitrary_self_types)] /// use std::marker::CoercePointee; /// use std::ops::Deref; /// @@ -1234,7 +1233,6 @@ pub trait FnPtr: Copy + Clone { /// If the type has multiple type parameters, then you must explicitly specify which one should be /// used for dynamic dispatch. For example: /// ``` -/// # #![feature(derive_coerce_pointee)] /// # use std::marker::{CoercePointee, PhantomData}; /// #[derive(CoercePointee)] /// #[repr(transparent)] @@ -1249,7 +1247,6 @@ pub trait FnPtr: Copy + Clone { /// /// A custom implementation of the `Rc` type: /// ``` -/// #![feature(derive_coerce_pointee)] /// use std::marker::CoercePointee; /// use std::ops::Deref; /// use std::ptr::NonNull; @@ -1306,7 +1303,7 @@ pub trait FnPtr: Copy + Clone { #[rustc_builtin_macro(CoercePointee, attributes(pointee))] #[allow_internal_unstable(dispatch_from_dyn, coerce_unsized, unsize, coerce_pointee_validated)] #[rustc_diagnostic_item = "CoercePointee"] -#[unstable(feature = "derive_coerce_pointee", issue = "123430")] +#[stable(feature = "derive_coerce_pointee", since = "CURRENT_RUSTC_VERSION")] pub macro CoercePointee($item:item) { /* compiler built-in */ } diff --git a/src/tools/miri/src/lib.rs b/src/tools/miri/src/lib.rs index 0bf5ae87f3836..42c257984df55 100644 --- a/src/tools/miri/src/lib.rs +++ b/src/tools/miri/src/lib.rs @@ -14,7 +14,6 @@ #![feature(strict_overflow_ops)] #![feature(pointer_is_aligned_to)] #![feature(unqualified_local_imports)] -#![feature(derive_coerce_pointee)] #![feature(arbitrary_self_types)] // Configure clippy and other lints #![allow( diff --git a/tests/ui/deriving/built-in-proc-macro-scope.rs b/tests/ui/deriving/built-in-proc-macro-scope.rs index e67197b7e2051..06a462754058f 100644 --- a/tests/ui/deriving/built-in-proc-macro-scope.rs +++ b/tests/ui/deriving/built-in-proc-macro-scope.rs @@ -2,8 +2,6 @@ //@ proc-macro: another-proc-macro.rs //@ compile-flags: -Zunpretty=expanded -#![feature(derive_coerce_pointee)] - #[macro_use] extern crate another_proc_macro; diff --git a/tests/ui/deriving/built-in-proc-macro-scope.stdout b/tests/ui/deriving/built-in-proc-macro-scope.stdout index fa4e50968f4de..579df90b1291e 100644 --- a/tests/ui/deriving/built-in-proc-macro-scope.stdout +++ b/tests/ui/deriving/built-in-proc-macro-scope.stdout @@ -1,14 +1,12 @@ #![feature(prelude_import)] #![no_std] -//@ check-pass -//@ proc-macro: another-proc-macro.rs -//@ compile-flags: -Zunpretty=expanded - -#![feature(derive_coerce_pointee)] #[prelude_import] use ::std::prelude::rust_2015::*; #[macro_use] extern crate std; +//@ check-pass +//@ proc-macro: another-proc-macro.rs +//@ compile-flags: -Zunpretty=expanded #[macro_use] extern crate another_proc_macro; diff --git a/tests/ui/deriving/coerce-pointee-bounds-issue-127647.rs b/tests/ui/deriving/coerce-pointee-bounds-issue-127647.rs index a1aabf1cb527d..5705f6ac9eaa4 100644 --- a/tests/ui/deriving/coerce-pointee-bounds-issue-127647.rs +++ b/tests/ui/deriving/coerce-pointee-bounds-issue-127647.rs @@ -1,7 +1,5 @@ //@ check-pass -#![feature(derive_coerce_pointee)] - #[derive(core::marker::CoercePointee)] #[repr(transparent)] pub struct Ptr<'a, #[pointee] T: OnDrop + ?Sized, X> { diff --git a/tests/ui/deriving/deriving-coerce-pointee-expanded.rs b/tests/ui/deriving/deriving-coerce-pointee-expanded.rs index 94be7031fb77f..963f331dacb9c 100644 --- a/tests/ui/deriving/deriving-coerce-pointee-expanded.rs +++ b/tests/ui/deriving/deriving-coerce-pointee-expanded.rs @@ -1,6 +1,5 @@ //@ check-pass //@ compile-flags: -Zunpretty=expanded -#![feature(derive_coerce_pointee)] use std::marker::CoercePointee; pub trait MyTrait {} diff --git a/tests/ui/deriving/deriving-coerce-pointee-expanded.stdout b/tests/ui/deriving/deriving-coerce-pointee-expanded.stdout index a774efbbe354b..3811583264078 100644 --- a/tests/ui/deriving/deriving-coerce-pointee-expanded.stdout +++ b/tests/ui/deriving/deriving-coerce-pointee-expanded.stdout @@ -1,12 +1,11 @@ #![feature(prelude_import)] #![no_std] -//@ check-pass -//@ compile-flags: -Zunpretty=expanded -#![feature(derive_coerce_pointee)] #[prelude_import] use ::std::prelude::rust_2015::*; #[macro_use] extern crate std; +//@ check-pass +//@ compile-flags: -Zunpretty=expanded use std::marker::CoercePointee; pub trait MyTrait {} diff --git a/tests/ui/deriving/deriving-coerce-pointee-neg.rs b/tests/ui/deriving/deriving-coerce-pointee-neg.rs index 2713366945e9a..ff286434b92cc 100644 --- a/tests/ui/deriving/deriving-coerce-pointee-neg.rs +++ b/tests/ui/deriving/deriving-coerce-pointee-neg.rs @@ -1,5 +1,5 @@ //@ proc-macro: malicious-macro.rs -#![feature(derive_coerce_pointee, arbitrary_self_types)] +#![feature(arbitrary_self_types)] extern crate core; extern crate malicious_macro; diff --git a/tests/ui/deriving/deriving-coerce-pointee.rs b/tests/ui/deriving/deriving-coerce-pointee.rs index 26762e4d0face..76da353841ef9 100644 --- a/tests/ui/deriving/deriving-coerce-pointee.rs +++ b/tests/ui/deriving/deriving-coerce-pointee.rs @@ -1,5 +1,6 @@ //@ run-pass -#![feature(derive_coerce_pointee, arbitrary_self_types)] + +#![feature(arbitrary_self_types)] use std::marker::CoercePointee; diff --git a/tests/ui/deriving/proc-macro-attribute-mixing.rs b/tests/ui/deriving/proc-macro-attribute-mixing.rs index 2c11c3f72ca59..08199ef9d1e4f 100644 --- a/tests/ui/deriving/proc-macro-attribute-mixing.rs +++ b/tests/ui/deriving/proc-macro-attribute-mixing.rs @@ -8,8 +8,6 @@ //@ proc-macro: another-proc-macro.rs //@ compile-flags: -Zunpretty=expanded -#![feature(derive_coerce_pointee)] - #[macro_use] extern crate another_proc_macro; diff --git a/tests/ui/deriving/proc-macro-attribute-mixing.stdout b/tests/ui/deriving/proc-macro-attribute-mixing.stdout index ad743d013d25d..51d1bf13abc2b 100644 --- a/tests/ui/deriving/proc-macro-attribute-mixing.stdout +++ b/tests/ui/deriving/proc-macro-attribute-mixing.stdout @@ -1,5 +1,9 @@ #![feature(prelude_import)] #![no_std] +#[prelude_import] +use ::std::prelude::rust_2015::*; +#[macro_use] +extern crate std; // This test certify that we can mix attribute macros from Rust and external proc-macros. // For instance, `#[derive(Default)]` uses `#[default]` and `#[derive(CoercePointee)]` uses // `#[pointee]`. @@ -10,12 +14,6 @@ //@ proc-macro: another-proc-macro.rs //@ compile-flags: -Zunpretty=expanded -#![feature(derive_coerce_pointee)] -#[prelude_import] -use ::std::prelude::rust_2015::*; -#[macro_use] -extern crate std; - #[macro_use] extern crate another_proc_macro; diff --git a/tests/ui/feature-gates/feature-gate-derive-coerce-pointee.rs b/tests/ui/feature-gates/feature-gate-derive-coerce-pointee.rs deleted file mode 100644 index d730849dcf6aa..0000000000000 --- a/tests/ui/feature-gates/feature-gate-derive-coerce-pointee.rs +++ /dev/null @@ -1,9 +0,0 @@ -use std::marker::CoercePointee; //~ ERROR use of unstable library feature `derive_coerce_pointee` - -#[derive(CoercePointee)] //~ ERROR use of unstable library feature `derive_coerce_pointee` -#[repr(transparent)] -struct MyPointer<'a, #[pointee] T: ?Sized> { - ptr: &'a T, -} - -fn main() {} diff --git a/tests/ui/feature-gates/feature-gate-derive-coerce-pointee.stderr b/tests/ui/feature-gates/feature-gate-derive-coerce-pointee.stderr deleted file mode 100644 index 19babe149d9a4..0000000000000 --- a/tests/ui/feature-gates/feature-gate-derive-coerce-pointee.stderr +++ /dev/null @@ -1,23 +0,0 @@ -error[E0658]: use of unstable library feature `derive_coerce_pointee` - --> $DIR/feature-gate-derive-coerce-pointee.rs:3:10 - | -LL | #[derive(CoercePointee)] - | ^^^^^^^^^^^^^ - | - = note: see issue #123430 for more information - = help: add `#![feature(derive_coerce_pointee)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - -error[E0658]: use of unstable library feature `derive_coerce_pointee` - --> $DIR/feature-gate-derive-coerce-pointee.rs:1:5 - | -LL | use std::marker::CoercePointee; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #123430 for more information - = help: add `#![feature(derive_coerce_pointee)]` to the crate attributes to enable - = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0658`. diff --git a/tests/ui/self/arbitrary_self_types_dispatch_to_vtable.rs b/tests/ui/self/arbitrary_self_types_dispatch_to_vtable.rs index f9e346ea11e21..f5628b9a5ea0b 100644 --- a/tests/ui/self/arbitrary_self_types_dispatch_to_vtable.rs +++ b/tests/ui/self/arbitrary_self_types_dispatch_to_vtable.rs @@ -1,6 +1,5 @@ //@ check-pass -#![feature(derive_coerce_pointee)] #![feature(arbitrary_self_types)] use std::marker::CoercePointee; diff --git a/tests/ui/self/dyn-dispatch-requires-supertrait-norm.rs b/tests/ui/self/dyn-dispatch-requires-supertrait-norm.rs index 55c070eb03682..f90c8a949b04c 100644 --- a/tests/ui/self/dyn-dispatch-requires-supertrait-norm.rs +++ b/tests/ui/self/dyn-dispatch-requires-supertrait-norm.rs @@ -1,10 +1,9 @@ //@ check-pass -#![feature(derive_coerce_pointee)] #![feature(arbitrary_self_types)] -use std::ops::Deref; use std::marker::CoercePointee; +use std::ops::Deref; use std::sync::Arc; trait MyTrait {} diff --git a/tests/ui/self/dyn-dispatch-requires-supertrait.rs b/tests/ui/self/dyn-dispatch-requires-supertrait.rs index f2661c406fef0..8836edc1d5e7f 100644 --- a/tests/ui/self/dyn-dispatch-requires-supertrait.rs +++ b/tests/ui/self/dyn-dispatch-requires-supertrait.rs @@ -1,10 +1,9 @@ //@ check-pass -#![feature(derive_coerce_pointee)] #![feature(arbitrary_self_types)] -use std::ops::Deref; use std::marker::CoercePointee; +use std::ops::Deref; use std::sync::Arc; trait MyTrait {} @@ -15,7 +14,7 @@ struct MyArc where T: MyTrait + ?Sized, { - inner: Arc + inner: Arc, } impl Deref for MyArc {