Skip to content

Commit efea79c

Browse files
NoratriebTaKO8Ki
andauthored
Gate macros behind #[cfg(not(bootstrap))]
Co-authored-by: Takayuki Maeda <[email protected]>
1 parent 2c7d32b commit efea79c

File tree

3 files changed

+2
-11
lines changed

3 files changed

+2
-11
lines changed

library/core/src/macros/mod.rs

-11
Original file line numberDiff line numberDiff line change
@@ -1558,17 +1558,6 @@ pub(crate) mod builtin {
15581558
/* compiler built-in */
15591559
}
15601560

1561-
/// Unstable placeholder for type ascription.
1562-
#[unstable(
1563-
feature = "type_ascription",
1564-
issue = "23416",
1565-
reason = "placeholder syntax for type ascription"
1566-
)]
1567-
#[cfg(bootstrap)]
1568-
pub macro type_ascribe($expr:expr, $ty:ty) {
1569-
$expr: $ty
1570-
}
1571-
15721561
/// Unstable implementation detail of the `rustc` compiler, do not use.
15731562
#[rustc_builtin_macro]
15741563
#[stable(feature = "rust1", since = "1.0.0")]

library/core/src/prelude/v1.rs

+1
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,5 @@ pub use crate::macros::builtin::cfg_eval;
104104
issue = "23416",
105105
reason = "placeholder syntax for type ascription"
106106
)]
107+
#[cfg(not(bootstrap))]
107108
pub use crate::macros::builtin::type_ascribe;

library/std/src/prelude/v1.rs

+1
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ pub use core::prelude::v1::cfg_eval;
9191
issue = "23416",
9292
reason = "placeholder syntax for type ascription"
9393
)]
94+
#[cfg(not(bootstrap))]
9495
pub use core::prelude::v1::type_ascribe;
9596

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

0 commit comments

Comments
 (0)