File tree Expand file tree Collapse file tree 3 files changed +1
-37
lines changed
Expand file tree Collapse file tree 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(
21442144 "doc" => {
21452145 warnings. push ( "profile `doc` is deprecated and has no effect" . to_string ( ) ) ;
21462146 }
2147- "test" | "bench" => {
2148- if root. panic . is_some ( ) {
2149- warnings. push ( format ! ( "`panic` setting is ignored for `{}` profile" , name) )
2150- }
2151- }
21522147 _ => { }
21532148 }
21542149
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\"`)
365365 . run ( ) ;
366366}
367367
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-
399368#[ cargo_test]
400369fn profile_panic_test_with_custom_harness ( ) {
401370 // 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() {
46904690 . build ( ) ;
46914691
46924692 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[..] " )
46944694 . masquerade_as_nightly_cargo ( & [ "panic-abort-tests" ] )
46954695 . run ( ) ;
46964696}
You can’t perform that action at this time.
0 commit comments