Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion exercises/move_semantics/move_semantics5.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// move_semantics5.rs
// Make me compile without adding any newlines or removing any of the lines.
// Make me compile without adding, removing, or changing any of the
// lines in `main()`.
// Execute `rustlings hint move_semantics5` for hints :)

// I AM NOT DONE
Expand Down
10 changes: 7 additions & 3 deletions info.toml
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,14 @@ path = "exercises/move_semantics/move_semantics5.rs"
mode = "compile"
hint = """
Carefully reason about the range in which each mutable reference is in
vogue. Does updating the value of referrent (x) immediately after the
mutable reference is taken helps? Read more about 'Mutable Referenes'
vogue. Does it help to update the value of referent (x) immediately after
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#1974 gets rid of referent altogether because it doesn't seem to help the explanation.

the mutable reference is taken? Read more about 'Mutable References'
in the book's section References and Borrowing':
https://doc.rust-lang.org/book/ch04-02-references-and-borrowing.html#mutable-references."""
https://doc.rust-lang.org/book/ch04-02-references-and-borrowing.html#mutable-references.

Additional hint:
If you can't add, change, or remove any statements in `main()`, can you
reorder them in a way that lets the program compile?"""

# PRIMITIVE TYPES

Expand Down