File tree 1 file changed +13
-4
lines changed
1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -1284,14 +1284,23 @@ pub trait FnPtr: Copy + Clone {
1284
1284
/// }
1285
1285
/// ```
1286
1286
#[ rustc_builtin_macro( CoercePointee , attributes( pointee) ) ]
1287
- #[ allow_internal_unstable( dispatch_from_dyn, coerce_unsized, unsize) ]
1287
+ #[ allow_internal_unstable( dispatch_from_dyn, coerce_unsized, unsize, coerce_pointee_validated ) ]
1288
1288
#[ unstable( feature = "derive_coerce_pointee" , issue = "123430" ) ]
1289
1289
pub macro CoercePointee ( $item: item) {
1290
1290
/* compiler built-in */
1291
1291
}
1292
1292
1293
+ /// A validation trait that is implemented on data with `derive(CoercePointee)`
1294
+ /// so that the compiler can enforce a set of rules that the target data must
1295
+ /// conform to in order for the derived behaviours are safe and useful for
1296
+ /// the purpose of the said macro.
1297
+ ///
1298
+ /// This trait will not ever be exposed for use as public part of the library
1299
+ /// and shall not ever be stabilised.
1293
1300
#[ cfg( not( bootstrap) ) ]
1294
- #[ lang = "coerce_pointee_wellformed " ]
1295
- #[ unstable( feature = "derive_coerce_pointee " , issue = "123430" ) ]
1301
+ #[ lang = "coerce_pointee_validated " ]
1302
+ #[ unstable( feature = "coerce_pointee_validated " , issue = "123430" ) ]
1296
1303
#[ doc( hidden) ]
1297
- pub trait CoercePointeeWellformed { }
1304
+ pub trait CoercePointeeValidated {
1305
+ /* compiler built-in */
1306
+ }
You can’t perform that action at this time.
0 commit comments