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
Working my way through 5.5.1, and the hint for move_semantics2 suggests multiple solutions. However, unless I've misunderstood something, neither of the first two suggestions produce the "expected output" described in the comments above main(); they both copy vec0 before it's populated, leaving it empty when printed.
As far as I can tell, the only suggestion that does work is the third (mutably borrow a reference to vec0), which, contradictory to what the hint says, is the only option which doesn't affect the output of the first println!.
halfbyte, EnderWolf50, busticated, Aliheym, Flimm and 3 more