Skip to content

Commit a6438c8

Browse files
committed
test(build-std): resolver too less deps
See #14935
1 parent 769f622 commit a6438c8

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

tests/build-std/main.rs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,3 +393,30 @@ fn test_proc_macro() {
393393
"#]])
394394
.run();
395395
}
396+
397+
#[cargo_test(build_std_real)]
398+
fn test_panic_abort() {
399+
// See rust-lang/cargo#14935
400+
let p = project()
401+
.file(
402+
"Cargo.toml",
403+
r#"
404+
[package]
405+
name = "foo"
406+
edition = "2021"
407+
"#,
408+
)
409+
.file("src/lib.rs", "#![no_std]")
410+
.build();
411+
412+
p.cargo("check")
413+
.build_std_arg("std,panic_abort")
414+
.env("RUSTFLAGS", "-C panic=abort")
415+
.arg("-Zbuild-std-features=panic_immediate_abort")
416+
.with_status(101)
417+
.with_stderr_data(str![[r#"
418+
[ERROR] package ID specification `panic_unwind` did not match any packages
419+
420+
"#]])
421+
.run();
422+
}

0 commit comments

Comments
 (0)