File tree 4 files changed +33
-0
lines changed
4 files changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -1743,6 +1743,21 @@ pub(crate) mod builtin {
1743
1743
/* compiler built-in */
1744
1744
}
1745
1745
1746
+ /// Provide a list of type aliases and other opaque-type-containing type definitions.
1747
+ /// This list will be used in the body of the item it is applied to to define opaque
1748
+ /// types' hidden types.
1749
+ /// Can only be applied to things that have bodies.
1750
+ #[ unstable(
1751
+ feature = "type_alias_impl_trait" ,
1752
+ issue = "63063" ,
1753
+ reason = "`type_alias_impl_trait` has open design concerns"
1754
+ ) ]
1755
+ #[ rustc_builtin_macro]
1756
+ #[ cfg( not( bootstrap) ) ]
1757
+ pub macro define_opaque( $( $tt: tt) * ) {
1758
+ /* compiler built-in */
1759
+ }
1760
+
1746
1761
/// Unstable placeholder for type ascription.
1747
1762
#[ allow_internal_unstable( builtin_syntax) ]
1748
1763
#[ unstable(
Original file line number Diff line number Diff line change @@ -111,3 +111,11 @@ pub use crate::macros::builtin::type_ascribe;
111
111
reason = "placeholder syntax for deref patterns"
112
112
) ]
113
113
pub use crate :: macros:: builtin:: deref;
114
+
115
+ #[ unstable(
116
+ feature = "type_alias_impl_trait" ,
117
+ issue = "63063" ,
118
+ reason = "`type_alias_impl_trait` has open design concerns"
119
+ ) ]
120
+ #[ cfg( not( bootstrap) ) ]
121
+ pub use crate :: macros:: builtin:: define_opaque;
Original file line number Diff line number Diff line change @@ -432,6 +432,7 @@ mod helper {
432
432
use super :: * ;
433
433
pub ( super ) type LazyResolve = impl ( FnOnce ( ) -> Capture ) + Send + Sync + UnwindSafe ;
434
434
435
+ #[ cfg_attr( not( bootstrap) , define_opaque( LazyResolve ) ) ]
435
436
pub ( super ) fn lazy_resolve ( mut capture : Capture ) -> LazyResolve {
436
437
move || {
437
438
// Use the global backtrace lock to synchronize this as it's a
Original file line number Diff line number Diff line change @@ -103,6 +103,15 @@ pub use core::prelude::v1::type_ascribe;
103
103
) ]
104
104
pub use core:: prelude:: v1:: deref;
105
105
106
+ // Do not `doc(no_inline)` either.
107
+ #[ unstable(
108
+ feature = "type_alias_impl_trait" ,
109
+ issue = "63063" ,
110
+ reason = "`type_alias_impl_trait` has open design concerns"
111
+ ) ]
112
+ #[ cfg( not( bootstrap) ) ]
113
+ pub use core:: prelude:: v1:: define_opaque;
114
+
106
115
// The file so far is equivalent to core/src/prelude/v1.rs. It is duplicated
107
116
// rather than glob imported because we want docs to show these re-exports as
108
117
// pointing to within `std`.
You can’t perform that action at this time.
0 commit comments