We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 769f622 commit a6438c8Copy full SHA for a6438c8
tests/build-std/main.rs
@@ -393,3 +393,30 @@ fn test_proc_macro() {
393
"#]])
394
.run();
395
}
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