> I can understand the need for an implicit copy when I pass 'x' to > str::from_chars. However, in the 'inquote' alt branch the copy seems to be > triggered by the access to 'st.quote'.
This has to do with the reference safety checker. As soon as you refer to `st` again the checker can no longer guarantee that the `x` reference, which points at a mutable field of `st`, is still live. If you flip the statements around so that `x` is not used after `st`, the warning (and the copy) will go away. _______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
