mirror of https://github.com/KaiserY/trpl-zh-cn
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
462 B
16 lines
462 B
$ 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
|
|
|
|
|
16 | drop(c);
|
|
| +++++ ~
|
|
|
|
For more information about this error, try `rustc --explain E0040`.
|
|
error: could not compile `drop-example` (bin "drop-example") due to 1 previous error
|