]> git.proxmox.com Git - rustc.git/blob - src/doc/book/listings/ch15-smart-pointers/listing-15-21/output.txt
New upstream version 1.63.0+dfsg1
[rustc.git] / src / doc / book / listings / ch15-smart-pointers / listing-15-21 / output.txt
1 $ cargo test
2 Compiling limit-tracker v0.1.0 (file:///projects/limit-tracker)
3 error[E0596]: cannot borrow `self.sent_messages` as mutable, as it is behind a `&` reference
4 --> src/lib.rs:58:13
5 |
6 2 | fn send(&self, msg: &str);
7 | ----- help: consider changing that to be a mutable reference: `&mut self`
8 ...
9 58 | self.sent_messages.push(String::from(message));
10 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `self` is a `&` reference, so the data it refers to cannot be borrowed as mutable
11
12 For more information about this error, try `rustc --explain E0596`.
13 error: could not compile `limit-tracker` due to previous error
14 warning: build failed, waiting for other jobs to finish...