File tree Expand file tree Collapse file tree 4 files changed +1630
-3
lines changed Expand file tree Collapse file tree 4 files changed +1630
-3
lines changed Original file line number Diff line number Diff line change 271271#[ allow( unused_extern_crates) ]
272272extern crate self as core;
273273
274+ #[ allow( unused_imports) ]
275+ use crate :: marker:: FnPtr ;
274276#[ prelude_import]
275277#[ allow( unused) ]
276278use prelude:: v1:: * ;
277-
278279#[ cfg( not( test) ) ] // See #65860
279280#[ macro_use]
280281mod macros;
@@ -440,5 +441,4 @@ pub mod simd {
440441 #[ unstable( feature = "portable_simd" , issue = "86656" ) ]
441442 pub use crate :: core_simd:: simd:: * ;
442443}
443-
444444include ! ( "primitive_docs.rs" ) ;
Original file line number Diff line number Diff line change @@ -1549,6 +1549,7 @@ mod prim_ref {}
15491549/// * [`Clone`]
15501550/// * [`Copy`]
15511551/// * [`Send`]
1552+ /// * [`Sized`]
15521553/// * [`Sync`]
15531554/// * [`Unpin`]
15541555/// * [`UnwindSafe`]
@@ -1588,3 +1589,18 @@ impl<Ret, T> Clone for fn(T) -> Ret {
15881589impl < Ret , T > Copy for fn ( T ) -> Ret {
15891590 // empty
15901591}
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 371371#![ feature( core_panic) ]
372372#![ feature( custom_test_frameworks) ]
373373#![ feature( edition_panic) ]
374+ #![ feature( fn_ptr_trait) ]
374375#![ feature( format_args_nl) ]
375376#![ feature( get_many_mut) ]
376377#![ feature( lazy_cell) ]
399400
400401// Explicitly import the prelude. The compiler uses this same unstable attribute
401402// to import the prelude implicitly when building crates that depend on std.
403+ #[ allow( unused_imports) ]
404+ use crate :: marker:: FnPtr ;
402405#[ prelude_import]
403406#[ allow( unused) ]
404407use prelude:: rust_2021:: * ;
405-
406408// Access to Bencher, etc.
407409#[ cfg( test) ]
408410extern crate test;
You can’t perform that action at this time.
0 commit comments