]> git.lizzy.rs Git - rust.git/blobdiff - library/core/src/const_closure.rs
fix various subst_identity vs skip_binder
[rust.git] / library / core / src / const_closure.rs
index 920c31233c18799a254a9f82282f8dbc30a56371..97900a4862f5653fc49c537fdc95c3690d71d9a0 100644 (file)
@@ -1,5 +1,4 @@
 use crate::marker::Destruct;
-#[cfg(not(bootstrap))]
 use crate::marker::Tuple;
 
 /// Struct representing a closure with mutably borrowed data.
@@ -46,33 +45,6 @@ pub(crate) const fn new<ClosureArguments, ClosureReturnValue>(
 
 macro_rules! impl_fn_mut_tuple {
     ($($var:ident)*) => {
-        #[cfg(bootstrap)]
-        #[allow(unused_parens)]
-        impl<'a, $($var,)* ClosureArguments, Function, ClosureReturnValue> const
-            FnOnce<ClosureArguments> for ConstFnMutClosure<($(&'a mut $var),*), Function>
-        where
-            Function: ~const Fn(($(&mut $var),*), ClosureArguments) -> ClosureReturnValue + ~const Destruct,
-        {
-            type Output = ClosureReturnValue;
-
-            extern "rust-call" fn call_once(mut self, args: ClosureArguments) -> Self::Output {
-            self.call_mut(args)
-            }
-        }
-        #[cfg(bootstrap)]
-        #[allow(unused_parens)]
-        impl<'a, $($var,)* ClosureArguments, Function, ClosureReturnValue> const
-            FnMut<ClosureArguments> for ConstFnMutClosure<($(&'a mut $var),*), Function>
-        where
-            Function: ~const Fn(($(&mut $var),*), ClosureArguments)-> ClosureReturnValue + ~const Destruct,
-        {
-            extern "rust-call" fn call_mut(&mut self, args: ClosureArguments) -> Self::Output {
-                #[allow(non_snake_case)]
-                let ($($var),*) = &mut self.data;
-                (self.func)(($($var),*), args)
-            }
-        }
-        #[cfg(not(bootstrap))]
         #[allow(unused_parens)]
         impl<'a, $($var,)* ClosureArguments: Tuple, Function, ClosureReturnValue> const
             FnOnce<ClosureArguments> for ConstFnMutClosure<($(&'a mut $var),*), Function>
@@ -85,7 +57,6 @@ extern "rust-call" fn call_once(mut self, args: ClosureArguments) -> Self::Outpu
             self.call_mut(args)
             }
         }
-        #[cfg(not(bootstrap))]
         #[allow(unused_parens)]
         impl<'a, $($var,)* ClosureArguments: Tuple, Function, ClosureReturnValue> const
             FnMut<ClosureArguments> for ConstFnMutClosure<($(&'a mut $var),*), Function>