trpl-zh-cn/listings/ch15-smart-pointers/listing-15-15/output.txt

14 lines
440 B
Plaintext
Raw Normal View History

2022-02-06 16:43:51 +08:00
$ cargo run
Compiling drop-example v0.1.0 (file:///projects/drop-example)
error[E0040]: explicit use of destructor method
--> src/main.rs:16:7
|
16 | c.drop();
| --^^^^--
| | |
| | explicit destructor calls not allowed
| help: consider using `drop` function: `drop(c)`
For more information about this error, try `rustc --explain E0040`.
error: could not compile `drop-example` due to previous error