1
Fork 0

Gate macros behind #[cfg(not(bootstrap))]

Co-authored-by: Takayuki Maeda <takoyaki0316@gmail.com>
This commit is contained in:
nils 2022-12-01 11:16:18 +01:00 committed by GitHub
parent 2c7d32b4f4
commit efea79ca80
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 11 deletions

View file

@ -1558,17 +1558,6 @@ pub(crate) mod builtin {
/* compiler built-in */ /* compiler built-in */
} }
/// Unstable placeholder for type ascription.
#[unstable(
feature = "type_ascription",
issue = "23416",
reason = "placeholder syntax for type ascription"
)]
#[cfg(bootstrap)]
pub macro type_ascribe($expr:expr, $ty:ty) {
$expr: $ty
}
/// Unstable implementation detail of the `rustc` compiler, do not use. /// Unstable implementation detail of the `rustc` compiler, do not use.
#[rustc_builtin_macro] #[rustc_builtin_macro]
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]

View file

@ -104,4 +104,5 @@ pub use crate::macros::builtin::cfg_eval;
issue = "23416", issue = "23416",
reason = "placeholder syntax for type ascription" reason = "placeholder syntax for type ascription"
)] )]
#[cfg(not(bootstrap))]
pub use crate::macros::builtin::type_ascribe; pub use crate::macros::builtin::type_ascribe;

View file

@ -91,6 +91,7 @@ pub use core::prelude::v1::cfg_eval;
issue = "23416", issue = "23416",
reason = "placeholder syntax for type ascription" reason = "placeholder syntax for type ascription"
)] )]
#[cfg(not(bootstrap))]
pub use core::prelude::v1::type_ascribe; pub use core::prelude::v1::type_ascribe;
// The file so far is equivalent to src/libcore/prelude/v1.rs, // The file so far is equivalent to src/libcore/prelude/v1.rs,