File tree Expand file tree Collapse file tree 3 files changed +3
-41
lines changed
Expand file tree Collapse file tree 3 files changed +3
-41
lines changed Original file line number Diff line number Diff line change @@ -634,16 +634,8 @@ impl TomlProfile {
634634 ) ;
635635 }
636636
637- match name {
638- "doc" => {
639- warnings. push ( "profile `doc` is deprecated and has no effect" . to_string ( ) ) ;
640- }
641- "test" | "bench" => {
642- if self . panic . is_some ( ) {
643- warnings. push ( format ! ( "`panic` setting is ignored for `{}` profile" , name) )
644- }
645- }
646- _ => { }
637+ if name == "doc" {
638+ warnings. push ( "profile `doc` is deprecated and has no effect" . to_string ( ) ) ;
647639 }
648640
649641 if let Some ( panic) = & self . panic {
Original file line number Diff line number Diff line change @@ -353,36 +353,6 @@ must be a boolean (`true`/`false`) or a string (`\"thin\"`/`\"fat\"`/`\"off\"`)
353353 . run ( ) ;
354354}
355355
356- #[ cargo_test]
357- fn profile_panic_test_bench ( ) {
358- let p = project ( )
359- . file (
360- "Cargo.toml" ,
361- r#"
362- [package]
363- name = "foo"
364- version = "0.0.1"
365-
366- [profile.test]
367- panic = "abort"
368-
369- [profile.bench]
370- panic = "abort"
371- "# ,
372- )
373- . file ( "src/lib.rs" , "" )
374- . build ( ) ;
375-
376- p. cargo ( "build" )
377- . with_stderr_contains (
378- "\
379- [WARNING] `panic` setting is ignored for `bench` profile
380- [WARNING] `panic` setting is ignored for `test` profile
381- " ,
382- )
383- . run ( ) ;
384- }
385-
386356/// Custom harness can have `-C panic="…"` passed in.
387357#[ cargo_test]
388358fn profile_panic_test_with_custom_harness ( ) {
Original file line number Diff line number Diff line change @@ -4485,7 +4485,7 @@ fn panic_abort_only_test() {
44854485 . build ( ) ;
44864486
44874487 p. cargo ( "test -Z panic-abort-tests -v" )
4488- . with_stderr_contains ( "warning: `panic` setting is ignored for `test` profile " )
4488+ . with_stderr_contains ( "[..]--crate-name foo [..]-C panic=abort[..] " )
44894489 . masquerade_as_nightly_cargo ( & [ "panic-abort-tests" ] )
44904490 . run ( ) ;
44914491}
You can’t perform that action at this time.
0 commit comments