Skip to content

Commit

Permalink
Gate macros behind #[cfg(not(bootstrap))]
Browse files Browse the repository at this point in the history
Co-authored-by: Takayuki Maeda <takoyaki0316@gmail.com>
  • Loading branch information
Noratrieb and TaKO8Ki committed Dec 1, 2022
1 parent 2c7d32b commit efea79c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
11 changes: 0 additions & 11 deletions library/core/src/macros/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1558,17 +1558,6 @@ pub(crate) mod builtin {
/* 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.
#[rustc_builtin_macro]
#[stable(feature = "rust1", since = "1.0.0")]
Expand Down
1 change: 1 addition & 0 deletions library/core/src/prelude/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,5 @@ pub use crate::macros::builtin::cfg_eval;
issue = "23416",
reason = "placeholder syntax for type ascription"
)]
#[cfg(not(bootstrap))]
pub use crate::macros::builtin::type_ascribe;
1 change: 1 addition & 0 deletions library/std/src/prelude/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ pub use core::prelude::v1::cfg_eval;
issue = "23416",
reason = "placeholder syntax for type ascription"
)]
#[cfg(not(bootstrap))]
pub use core::prelude::v1::type_ascribe;

// The file so far is equivalent to src/libcore/prelude/v1.rs,
Expand Down

0 comments on commit efea79c

Please sign in to comment.