You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a few aspects of "static" (non-closure) functions that I find useful to know but I can't seem to locate in the docs:
They all implement Copy.
And they don't implement Clone (is this unusual?)
They automatically implement the respective function call traits Fn, FnMut and FnOnce.
And since they don't have an environment... they are equivalent?
I think it might be appropriate to have an entry in the std/core documentation with this. Not sure if a new "primitive" page would be appropriate for it.
The text was updated successfully, but these errors were encountered:
The lack of Clone is a rather annoying bug (#28229) and does of course makes no sense to keep around (Copy requires that Clone is implemented according to its definition).
Tagging with T-doc. cc @rust-lang/docs, maybe this is good for inclusion into the reference? Or the book?
Mark-Simulacrum
added
the
A-docs
Area: documentation for any part of the project, including the compiler, standard library, and tools
label
May 16, 2017
There are a few aspects of "static" (non-closure) functions that I find useful to know but I can't seem to locate in the docs:
Copy
.Clone
(is this unusual?)Fn
,FnMut
andFnOnce
.I think it might be appropriate to have an entry in the
std
/core
documentation with this. Not sure if a new "primitive" page would be appropriate for it.The text was updated successfully, but these errors were encountered: