File tree 3 files changed +1
-37
lines changed
3 files changed +1
-37
lines changed Original file line number Diff line number Diff line change @@ -2144,11 +2144,6 @@ pub fn validate_profile(
2144
2144
"doc" => {
2145
2145
warnings. push ( "profile `doc` is deprecated and has no effect" . to_string ( ) ) ;
2146
2146
}
2147
- "test" | "bench" => {
2148
- if root. panic . is_some ( ) {
2149
- warnings. push ( format ! ( "`panic` setting is ignored for `{}` profile" , name) )
2150
- }
2151
- }
2152
2147
_ => { }
2153
2148
}
2154
2149
Original file line number Diff line number Diff line change @@ -365,37 +365,6 @@ must be a boolean (`true`/`false`) or a string (`\"thin\"`/`\"fat\"`/`\"off\"`)
365
365
. run ( ) ;
366
366
}
367
367
368
- #[ cargo_test]
369
- fn profile_panic_test_bench ( ) {
370
- let p = project ( )
371
- . file (
372
- "Cargo.toml" ,
373
- r#"
374
- [package]
375
- name = "foo"
376
- version = "0.0.1"
377
- edition = "2015"
378
-
379
- [profile.test]
380
- panic = "abort"
381
-
382
- [profile.bench]
383
- panic = "abort"
384
- "# ,
385
- )
386
- . file ( "src/lib.rs" , "" )
387
- . build ( ) ;
388
-
389
- p. cargo ( "build" )
390
- . with_stderr_contains (
391
- "\
392
- [WARNING] `panic` setting is ignored for `bench` profile
393
- [WARNING] `panic` setting is ignored for `test` profile
394
- " ,
395
- )
396
- . run ( ) ;
397
- }
398
-
399
368
#[ cargo_test]
400
369
fn profile_panic_test_with_custom_harness ( ) {
401
370
// Custom harness can have `-C panic="…"` passed in.
Original file line number Diff line number Diff line change @@ -4690,7 +4690,7 @@ fn panic_abort_only_test() {
4690
4690
. build ( ) ;
4691
4691
4692
4692
p. cargo ( "test -Z panic-abort-tests -v" )
4693
- . with_stderr_contains ( "warning: `panic` setting is ignored for `test` profile " )
4693
+ . with_stderr_contains ( "[..]--crate-name foo [..]-C panic=abort[..] " )
4694
4694
. masquerade_as_nightly_cargo ( & [ "panic-abort-tests" ] )
4695
4695
. run ( ) ;
4696
4696
}
You can’t perform that action at this time.
0 commit comments