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 {
1546
1546
/* compiler built-in */
1547
1547
}
1548
1548
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
+
1549
1572
/// Unstable implementation detail of the `rustc` compiler, do not use.
1550
1573
#[ rustc_builtin_macro]
1551
1574
#[ 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;
98
98
reason = "`cfg_eval` is a recently implemented feature"
99
99
) ]
100
100
pub 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;
85
85
) ]
86
86
pub use core:: prelude:: v1:: cfg_eval;
87
87
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
+
88
96
// The file so far is equivalent to src/libcore/prelude/v1.rs,
89
97
// and below to src/liballoc/prelude.rs.
90
98
// Those files are duplicated rather than using glob imports
You can’t perform that action at this time.
0 commit comments