File tree Expand file tree Collapse file tree 4 files changed +31
-0
lines changed Expand file tree Collapse file tree 4 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -1452,6 +1452,18 @@ pub(crate) mod builtin {
1452
1452
/* compiler built-in */
1453
1453
}
1454
1454
1455
+ /// Expands all `#[cfg]` and `#[cfg_attr]` attributes in the code fragment it's applied to.
1456
+ #[ cfg( not( bootstrap) ) ]
1457
+ #[ unstable(
1458
+ feature = "cfg_eval" ,
1459
+ issue = "82679" ,
1460
+ reason = "`cfg_eval` is a recently implemented feature"
1461
+ ) ]
1462
+ #[ rustc_builtin_macro]
1463
+ pub macro cfg_eval( $( $tt: tt) * ) {
1464
+ /* compiler built-in */
1465
+ }
1466
+
1455
1467
/// Unstable implementation detail of the `rustc` compiler, do not use.
1456
1468
#[ rustc_builtin_macro]
1457
1469
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
Original file line number Diff line number Diff line change @@ -81,3 +81,12 @@ pub use crate::macros::builtin::derive;
81
81
) ]
82
82
#[ doc( no_inline) ]
83
83
pub use crate :: macros:: builtin:: cfg_accessible;
84
+
85
+ #[ cfg( not( bootstrap) ) ]
86
+ #[ unstable(
87
+ feature = "cfg_eval" ,
88
+ issue = "82679" ,
89
+ reason = "`cfg_eval` is a recently implemented feature"
90
+ ) ]
91
+ #[ doc( no_inline) ]
92
+ pub use crate :: macros:: builtin:: cfg_eval;
Original file line number Diff line number Diff line change 234
234
#![ feature( box_syntax) ]
235
235
#![ feature( c_variadic) ]
236
236
#![ feature( cfg_accessible) ]
237
+ #![ cfg_attr( not( bootstrap) , feature( cfg_eval) ) ]
237
238
#![ feature( cfg_target_has_atomic) ]
238
239
#![ feature( cfg_target_thread_local) ]
239
240
#![ feature( char_error_internals) ]
Original file line number Diff line number Diff line change @@ -67,6 +67,15 @@ pub use core::prelude::v1::derive;
67
67
#[ doc( hidden) ]
68
68
pub use core:: prelude:: v1:: cfg_accessible;
69
69
70
+ #[ cfg( not( bootstrap) ) ]
71
+ #[ unstable(
72
+ feature = "cfg_eval" ,
73
+ issue = "82679" ,
74
+ reason = "`cfg_eval` is a recently implemented feature"
75
+ ) ]
76
+ #[ doc( hidden) ]
77
+ pub use core:: prelude:: v1:: cfg_eval;
78
+
70
79
// The file so far is equivalent to src/libcore/prelude/v1.rs,
71
80
// and below to src/liballoc/prelude.rs.
72
81
// Those files are duplicated rather than using glob imports
You can’t perform that action at this time.
0 commit comments