File tree Expand file tree Collapse file tree 4 files changed +37
-3
lines changed Expand file tree Collapse file tree 4 files changed +37
-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 @@ -1552,6 +1552,7 @@ mod prim_ref {}
15521552/// * [`Clone`]
15531553/// * [`Copy`]
15541554/// * [`Send`]
1555+ /// * [`Sized`]
15551556/// * [`Sync`]
15561557/// * [`Unpin`]
15571558/// * [`UnwindSafe`]
@@ -1591,3 +1592,18 @@ impl<Ret, T> Clone for fn(T) -> Ret {
15911592impl < Ret , T > Copy for fn ( T ) -> Ret {
15921593 // empty
15931594}
1595+
1596+ // Fake impl that's only really used for docs.
1597+ #[ cfg( doc) ]
1598+ #[ unstable(
1599+ feature = "fn_ptr_trait" ,
1600+ issue = "none" ,
1601+ reason = "internal trait for implementing various traits for all function pointers"
1602+ ) ]
1603+ #[ doc( fake_variadic) ]
1604+ /// This trait is implemented on function pointers with any number of arguments.
1605+ impl < Ret , T > FnPtr for fn ( T ) -> Ret {
1606+ fn addr ( self ) -> * const ( ) {
1607+ // empty
1608+ }
1609+ }
Original file line number Diff line number Diff line change 347347#![ feature( core_panic) ]
348348#![ feature( custom_test_frameworks) ]
349349#![ feature( edition_panic) ]
350+ #![ feature( fn_ptr_trait) ]
350351#![ feature( format_args_nl) ]
351352#![ feature( get_many_mut) ]
352353#![ feature( lazy_cell) ]
376377
377378// Explicitly import the prelude. The compiler uses this same unstable attribute
378379// to import the prelude implicitly when building crates that depend on std.
380+ #[ allow( unused_imports) ]
381+ use crate :: marker:: FnPtr ;
379382#[ prelude_import]
380383#[ allow( unused) ]
381384use prelude:: rust_2021:: * ;
382-
383385// Access to Bencher, etc.
384386#[ cfg( test) ]
385387extern crate test;
Original file line number Diff line number Diff line change @@ -1552,6 +1552,7 @@ mod prim_ref {}
15521552/// * [`Clone`]
15531553/// * [`Copy`]
15541554/// * [`Send`]
1555+ /// * [`Sized`]
15551556/// * [`Sync`]
15561557/// * [`Unpin`]
15571558/// * [`UnwindSafe`]
@@ -1591,3 +1592,18 @@ impl<Ret, T> Clone for fn(T) -> Ret {
15911592impl < Ret , T > Copy for fn ( T ) -> Ret {
15921593 // empty
15931594}
1595+
1596+ // Fake impl that's only really used for docs.
1597+ #[ cfg( doc) ]
1598+ #[ unstable(
1599+ feature = "fn_ptr_trait" ,
1600+ issue = "none" ,
1601+ reason = "internal trait for implementing various traits for all function pointers"
1602+ ) ]
1603+ #[ doc( fake_variadic) ]
1604+ /// This trait is implemented on function pointers with any number of arguments.
1605+ impl < Ret , T > FnPtr for fn ( T ) -> Ret {
1606+ fn addr ( self ) -> * const ( ) {
1607+ // empty
1608+ }
1609+ }
You can’t perform that action at this time.
0 commit comments