This code doesn't compile:
extern crate iron;
#[marco_use] //misspelled here
extern crate mime;
use iron::prelude::*;
use iron::status;
fn main() {
let mut response = Response::new();
response.set_mut(mime!(Text/Html; Charset=Utf8));
}
it shows:
error: cannot find macro `mime!` in this scope
--> src/main.rs:10:22
|
10 | response.set_mut(mime!(Text/Html; Charset=Utf8));
| ^^^^
If I add extern crate hyper; use hyper::mime::*;
, then it shows:
error: The attribute `marco_use` is currently unknown to the compiler and
may have meaning added to it in the future (see issue #29642)
--> src\main.rs:2:1
|
2 | #[marco_use] extern crate mime;
| ^^^^^^^^^^^^
If I could've seen this earlier, it would've helped me to fix the mistake...
I guess Cargo only shows one error? I could not find anything about this behaviour online. How can I see all errors?
The compilation process is divided into several stages and if during one of them an error breaks the build, the following stages are not processed further. This is not specific to Cargo, but rustc
as well (example: When are numeric literals assigned to default types?).
I haven't seen it officially documented, but the high-level process has been described by japaric:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With