Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
undefined | Better HN
0 points
lpghatguy
6y ago
0 comments
Share
This code compiles just fine. It doesn't do anything since immutable references are Copy, and so dropping them doesn't do anything.
https://play.rust-lang.org/?version=stable&mode=debug&editio...
0 comments
default
newest
oldest
hathawsh
6y ago
Oh right, I forgot about the interaction with generics in this case. Semantically, I suppose it's creating and dropping a reference 4 times.
j
/
k
navigate · click thread line to collapse