since &mut T is not Copy, why is this not an error: fn foo<T>(arg: &mut T) { loop { bar(arg); } } for contrast, this is an error unless a Copy bound is added to T: fn foo<T>(arg: T) { loop { bar(arg); } }
-
-
haha yeah, when i went looking for some documentation the first thing i found was a niko blog post from 2 years before 1.0 https://smallcultfollowing.com/babysteps/blog/2013/11/20/parameter-coercion-in-rust/#reborrowing …
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Funnily enough the best thing I could find was a reddit post from a few years ago that said this would heavily be documented in the new book. Guess that didn‘t happen afterall.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.