test-error.rs:
Compiling:
$> rustc --test test-error.rs
test-error.rs:1:1: 1:4 error: unresolved import `std::slice::AsSlice`. Maybe a missing `extern crate std`?
test-error.rs:1 #![no_std]
^~~
error: aborting due to previous error
This isn't very helpful. Changing the file to
#![no_std]
extern crate core;
mod std { mod slice { pub use core::slice::AsSlice; } }
instead gives the error message
test-error.rs:1:1: 1:1 error: failed to resolve. Could not find `os` in `std`.
test-error.rs:1 #![no_std]
^
test-error.rs:1:1: 1:1 error: unresolved name `std::os::args`.
test-error.rs:1 #![no_std]
^
error: aborting due to 2 previous errors
The error always refers to the first line of the file, so if you have feature gates before #![no_std], the error will refer to them.
test-error.rs:
Compiling:
This isn't very helpful. Changing the file to
instead gives the error message
The error always refers to the first line of the file, so if you have feature gates before
#![no_std], the error will refer to them.