File tree 4 files changed +1630
-3
lines changed
4 files changed +1630
-3
lines changed Original file line number Diff line number Diff line change 271
271
#[ allow( unused_extern_crates) ]
272
272
extern crate self as core;
273
273
274
+ #[ allow( unused_imports) ]
275
+ use crate :: marker:: FnPtr ;
274
276
#[ prelude_import]
275
277
#[ allow( unused) ]
276
278
use prelude:: v1:: * ;
277
-
278
279
#[ cfg( not( test) ) ] // See #65860
279
280
#[ macro_use]
280
281
mod macros;
@@ -440,5 +441,4 @@ pub mod simd {
440
441
#[ unstable( feature = "portable_simd" , issue = "86656" ) ]
441
442
pub use crate :: core_simd:: simd:: * ;
442
443
}
443
-
444
444
include ! ( "primitive_docs.rs" ) ;
Original file line number Diff line number Diff line change @@ -1549,6 +1549,7 @@ mod prim_ref {}
1549
1549
/// * [`Clone`]
1550
1550
/// * [`Copy`]
1551
1551
/// * [`Send`]
1552
+ /// * [`Sized`]
1552
1553
/// * [`Sync`]
1553
1554
/// * [`Unpin`]
1554
1555
/// * [`UnwindSafe`]
@@ -1588,3 +1589,18 @@ impl<Ret, T> Clone for fn(T) -> Ret {
1588
1589
impl < Ret , T > Copy for fn ( T ) -> Ret {
1589
1590
// empty
1590
1591
}
1592
+
1593
+ // Fake impl that's only really used for docs.
1594
+ #[ cfg( doc) ]
1595
+ #[ unstable(
1596
+ feature = "fn_ptr_trait" ,
1597
+ issue = "none" ,
1598
+ reason = "internal trait for implementing various traits for all function pointers"
1599
+ ) ]
1600
+ #[ doc( fake_variadic) ]
1601
+ /// This trait is implemented on function pointers with any number of arguments.
1602
+ impl < Ret , T > FnPtr for fn ( T ) -> Ret {
1603
+ fn addr ( self ) -> * const ( ) {
1604
+ // empty
1605
+ }
1606
+ }
Original file line number Diff line number Diff line change 371
371
#![ feature( core_panic) ]
372
372
#![ feature( custom_test_frameworks) ]
373
373
#![ feature( edition_panic) ]
374
+ #![ feature( fn_ptr_trait) ]
374
375
#![ feature( format_args_nl) ]
375
376
#![ feature( get_many_mut) ]
376
377
#![ feature( lazy_cell) ]
399
400
400
401
// Explicitly import the prelude. The compiler uses this same unstable attribute
401
402
// to import the prelude implicitly when building crates that depend on std.
403
+ #[ allow( unused_imports) ]
404
+ use crate :: marker:: FnPtr ;
402
405
#[ prelude_import]
403
406
#[ allow( unused) ]
404
407
use prelude:: rust_2021:: * ;
405
-
406
408
// Access to Bencher, etc.
407
409
#[ cfg( test) ]
408
410
extern crate test;
You can’t perform that action at this time.
0 commit comments