diff options
| author | Jake Goulding <jake.goulding@gmail.com> | 2020-11-19 15:01:48 -0500 |
|---|---|---|
| committer | Jake Goulding <jake.goulding@gmail.com> | 2020-11-19 19:23:36 -0500 |
| commit | dcef5ff372742eb3d8a1b5cbbc2141e757bc33d1 (patch) | |
| tree | 19a1c632281f8187c2b5e7d397528e4a55df41ab /library/proc_macro/src | |
| parent | 3d3c8c5e0d534cdd794f1b3359089eba031d492c (diff) | |
| download | rust-dcef5ff372742eb3d8a1b5cbbc2141e757bc33d1.tar.gz rust-dcef5ff372742eb3d8a1b5cbbc2141e757bc33d1.zip | |
Bump bootstrap compiler version
Diffstat (limited to 'library/proc_macro/src')
| -rw-r--r-- | library/proc_macro/src/bridge/client.rs | 15 | ||||
| -rw-r--r-- | library/proc_macro/src/bridge/scoped_cell.rs | 3 | ||||
| -rw-r--r-- | library/proc_macro/src/lib.rs | 2 |
3 files changed, 7 insertions, 13 deletions
diff --git a/library/proc_macro/src/bridge/client.rs b/library/proc_macro/src/bridge/client.rs index dfe5df965cf..c6bec5a6fbd 100644 --- a/library/proc_macro/src/bridge/client.rs +++ b/library/proc_macro/src/bridge/client.rs @@ -401,8 +401,7 @@ fn run_client<A: for<'a, 's> DecodeMut<'a, 's, ()>, R: Encode<()>>( } impl Client<fn(crate::TokenStream) -> crate::TokenStream> { - #[cfg_attr(not(bootstrap), rustc_allow_const_fn_unstable(const_fn))] - #[cfg_attr(bootstrap, allow_internal_unstable(const_fn))] + #[rustc_allow_const_fn_unstable(const_fn)] pub const fn expand1(f: fn(crate::TokenStream) -> crate::TokenStream) -> Self { extern "C" fn run( bridge: Bridge<'_>, @@ -415,8 +414,7 @@ impl Client<fn(crate::TokenStream) -> crate::TokenStream> { } impl Client<fn(crate::TokenStream, crate::TokenStream) -> crate::TokenStream> { - #[cfg_attr(not(bootstrap), rustc_allow_const_fn_unstable(const_fn))] - #[cfg_attr(bootstrap, allow_internal_unstable(const_fn))] + #[rustc_allow_const_fn_unstable(const_fn)] pub const fn expand2( f: fn(crate::TokenStream, crate::TokenStream) -> crate::TokenStream, ) -> Self { @@ -461,8 +459,7 @@ impl ProcMacro { } } - #[cfg_attr(not(bootstrap), rustc_allow_const_fn_unstable(const_fn))] - #[cfg_attr(bootstrap, allow_internal_unstable(const_fn))] + #[rustc_allow_const_fn_unstable(const_fn)] pub const fn custom_derive( trait_name: &'static str, attributes: &'static [&'static str], @@ -471,8 +468,7 @@ impl ProcMacro { ProcMacro::CustomDerive { trait_name, attributes, client: Client::expand1(expand) } } - #[cfg_attr(not(bootstrap), rustc_allow_const_fn_unstable(const_fn))] - #[cfg_attr(bootstrap, allow_internal_unstable(const_fn))] + #[rustc_allow_const_fn_unstable(const_fn)] pub const fn attr( name: &'static str, expand: fn(crate::TokenStream, crate::TokenStream) -> crate::TokenStream, @@ -480,8 +476,7 @@ impl ProcMacro { ProcMacro::Attr { name, client: Client::expand2(expand) } } - #[cfg_attr(not(bootstrap), rustc_allow_const_fn_unstable(const_fn))] - #[cfg_attr(bootstrap, allow_internal_unstable(const_fn))] + #[rustc_allow_const_fn_unstable(const_fn)] pub const fn bang( name: &'static str, expand: fn(crate::TokenStream) -> crate::TokenStream, diff --git a/library/proc_macro/src/bridge/scoped_cell.rs b/library/proc_macro/src/bridge/scoped_cell.rs index e7c32b10384..e1307856175 100644 --- a/library/proc_macro/src/bridge/scoped_cell.rs +++ b/library/proc_macro/src/bridge/scoped_cell.rs @@ -35,8 +35,7 @@ impl<'a, 'b, T: LambdaL> DerefMut for RefMutL<'a, 'b, T> { pub struct ScopedCell<T: LambdaL>(Cell<<T as ApplyL<'static>>::Out>); impl<T: LambdaL> ScopedCell<T> { - #[cfg_attr(not(bootstrap), rustc_allow_const_fn_unstable(const_fn))] - #[cfg_attr(bootstrap, allow_internal_unstable(const_fn))] + #[rustc_allow_const_fn_unstable(const_fn)] pub const fn new(value: <T as ApplyL<'static>>::Out) -> Self { ScopedCell(Cell::new(value)) } diff --git a/library/proc_macro/src/lib.rs b/library/proc_macro/src/lib.rs index 03733d3b3ed..3ba706b09e8 100644 --- a/library/proc_macro/src/lib.rs +++ b/library/proc_macro/src/lib.rs @@ -18,7 +18,7 @@ test(no_crate_inject, attr(deny(warnings))), test(attr(allow(dead_code, deprecated, unused_variables, unused_mut))) )] -#![cfg_attr(not(bootstrap), feature(rustc_allow_const_fn_unstable))] +#![feature(rustc_allow_const_fn_unstable)] #![feature(nll)] #![feature(staged_api)] #![feature(const_fn)] |
