mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-25 11:14:46 +00:00
test(build-std): make mock-std closer to real world
`test_std_on_unsupported_target` never really succeed to build those targets, due to * local rustup may not have `{aarch64,x86_64}-unknown-none` installed. * `core` and `compiler-builtins` mock crate are not `no_std` nor `no_core` * the dummy `main.rs` uses `println!` and is not `no_std`. This commit make it compile, if you have those targets installed.
This commit is contained in:
parent
05f54fdc34
commit
fbb5b90fe0
@ -1 +1 @@
|
||||
// intentionally blank
|
||||
#![no_std]
|
||||
|
@ -1,3 +1,4 @@
|
||||
#![no_std]
|
||||
#![feature(staged_api)]
|
||||
#![stable(since = "1.0.0", feature = "dummy")]
|
||||
|
||||
|
@ -395,12 +395,13 @@ fn test_std_on_unsupported_target() {
|
||||
|
||||
let p = project()
|
||||
.file(
|
||||
"src/main.rs",
|
||||
"src/lib.rs",
|
||||
r#"
|
||||
fn main() {
|
||||
println!("hello");
|
||||
}
|
||||
"#,
|
||||
#![no_std]
|
||||
pub fn foo() {
|
||||
assert_eq!(u8::MIN, 0);
|
||||
}
|
||||
"#,
|
||||
)
|
||||
.build();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user