Y
Hacker News
new
|
ask
|
show
|
jobs
by
db48x
2446 days ago
It won't compile, because the compiler keeps track of where you moved the value and notices that x now has no value. If you want the function to borrow the argument instead, make it take a reference, &x.