File tree Expand file tree Collapse file tree 3 files changed +38
-0
lines changed
Expand file tree Collapse file tree 3 files changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -1546,6 +1546,29 @@ pub(crate) mod builtin {
15461546 /* compiler built-in */
15471547 }
15481548
1549+ /// Unstable placeholder for type ascription.
1550+ #[ rustc_builtin_macro]
1551+ #[ unstable(
1552+ feature = "type_ascription" ,
1553+ issue = "23416" ,
1554+ reason = "placeholder syntax for type ascription"
1555+ ) ]
1556+ #[ cfg( not( bootstrap) ) ]
1557+ pub macro type_ascribe ( $expr: expr, $ty: ty) {
1558+ /* compiler built-in */
1559+ }
1560+
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+
15491572 /// Unstable implementation detail of the `rustc` compiler, do not use.
15501573 #[ rustc_builtin_macro]
15511574 #[ stable ( feature = "rust1" , since = "1.0.0" ) ]
Original file line number Diff line number Diff line change @@ -98,3 +98,10 @@ pub use crate::macros::builtin::cfg_accessible;
9898 reason = "`cfg_eval` is a recently implemented feature"
9999) ]
100100pub use crate :: macros:: builtin:: cfg_eval;
101+
102+ #[ unstable(
103+ feature = "type_ascription" ,
104+ issue = "23416" ,
105+ reason = "placeholder syntax for type ascription"
106+ ) ]
107+ pub use crate :: macros:: builtin:: type_ascribe;
Original file line number Diff line number Diff line change @@ -85,6 +85,14 @@ pub use core::prelude::v1::cfg_accessible;
8585) ]
8686pub use core:: prelude:: v1:: cfg_eval;
8787
88+ // Do not `doc(no_inline)` either.
89+ #[ unstable(
90+ feature = "type_ascription" ,
91+ issue = "23416" ,
92+ reason = "placeholder syntax for type ascription"
93+ ) ]
94+ pub use core:: prelude:: v1:: type_ascribe;
95+
8896// The file so far is equivalent to src/libcore/prelude/v1.rs,
8997// and below to src/liballoc/prelude.rs.
9098// Those files are duplicated rather than using glob imports
You can’t perform that action at this time.
0 commit comments