#![crate_name="odd_span"]
#![no_std]
#[test]
fn t(){
}
will result in
test.rs:1:1: 1:4 error: unresolved import `std::slice::AsSlice`. Maybe a missing `extern crate std`?
test.rs:1 #![crate_name="odd_span"]
^~~
error: aborting due to previous error
Note the odd span and error location.
Since --test depends on libstd, maybe a following error message would be better?
test.rs:2:1: 1:4 error: Test harness binaries require std crate. Maybe a missing `extern crate std`?
test.rs:2 #![no_std]
^~~~~~~~~~
error: aborting due to previous error