File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -1041,10 +1041,6 @@ fn build_base_args(
1041
1041
cmd. arg ( "-C" ) . arg ( & format ! ( "opt-level={}" , opt_level) ) ;
1042
1042
}
1043
1043
1044
- if !rustflags. is_empty ( ) {
1045
- cmd. args ( & rustflags) ;
1046
- }
1047
-
1048
1044
if * panic != PanicStrategy :: Unwind {
1049
1045
cmd. arg ( "-C" ) . arg ( format ! ( "panic={}" , panic) ) ;
1050
1046
}
@@ -1080,6 +1076,9 @@ fn build_base_args(
1080
1076
}
1081
1077
1082
1078
cmd. args ( unit. pkg . manifest ( ) . rustflags ( ) ) ;
1079
+ if !rustflags. is_empty ( ) {
1080
+ cmd. args ( & rustflags) ;
1081
+ }
1083
1082
if let Some ( args) = cx. bcx . extra_args_for ( unit) {
1084
1083
cmd. args ( args) ;
1085
1084
}
Original file line number Diff line number Diff line change @@ -435,7 +435,7 @@ pub fn foo(num: i32) -> u32 {
435
435
}
436
436
437
437
#[ cargo_test]
438
- fn profile_rustflags_doesnt_have_precedence ( ) {
438
+ fn profile_rustflags_has_precedence ( ) {
439
439
let foo = project ( )
440
440
. file (
441
441
"Cargo.toml" ,
@@ -447,10 +447,10 @@ fn profile_rustflags_doesnt_have_precedence() {
447
447
version = "0.0.1"
448
448
449
449
[lints.rust]
450
- "unsafe_code" = "allow "
450
+ "unsafe_code" = "deny "
451
451
452
452
[profile.dev]
453
- rustflags = ["-D ", "unsafe_code"]
453
+ rustflags = ["-A ", "unsafe_code"]
454
454
"# ,
455
455
)
456
456
. file (
@@ -466,7 +466,6 @@ pub fn foo(num: i32) -> u32 {
466
466
foo. cargo ( "check" )
467
467
. arg ( "-v" )
468
468
. masquerade_as_nightly_cargo ( & [ "lints" , "profile-rustflags" ] )
469
- . with_status ( 0 )
470
469
. run ( ) ;
471
470
}
472
471
You can’t perform that action at this time.
0 commit comments