- Notifications
You must be signed in to change notification settings - Fork 13.9k
Closed
Description
struct MyObject { text: String, } fn do_something_owned(_o: MyObject) {} fn main() { let mut my_object = MyObject { text: String::from("sometest") }; do_something_owned(my_object); my_object.text = String::from("we're done"); } Playground link: https://is.gd/3eEKsV
I would expect it to be a compile time error.
Metadata
Metadata
Assignees
Labels
No labels