We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
FnPtr
1 parent 113f72d commit eca4393Copy full SHA for eca4393
core/src/marker.rs
@@ -922,3 +922,18 @@ mod copy_impls {
922
#[stable(feature = "rust1", since = "1.0.0")]
923
impl<T: ?Sized> Copy for &T {}
924
}
925
+
926
+/// A common trait implemented by all function pointers.
927
+#[unstable(
928
+ feature = "fn_ptr_trait",
929
+ issue = "none",
930
+ reason = "internal trait for implementing various traits for all function pointers"
931
+)]
932
+#[lang = "fn_ptr_trait"]
933
+#[cfg(not(bootstrap))]
934
+#[rustc_deny_explicit_impl]
935
+pub trait FnPtr {
936
+ /// Returns the address of the function pointer.
937
+ #[lang = "fn_ptr_addr"]
938
+ fn addr(self) -> *const ();
939
+}
0 commit comments