File tree 2 files changed +6
-7
lines changed
2 files changed +6
-7
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 @@ -440,7 +440,7 @@ pub fn foo(num: i32) -> u32 {
440
440
}
441
441
442
442
#[ cargo_test]
443
- fn profile_rustflags_doesnt_have_precedence ( ) {
443
+ fn profile_rustflags_has_precedence ( ) {
444
444
let foo = project ( )
445
445
. file (
446
446
"Cargo.toml" ,
@@ -452,10 +452,10 @@ fn profile_rustflags_doesnt_have_precedence() {
452
452
version = "0.0.1"
453
453
454
454
[lints.rust]
455
- "unsafe_code" = "allow "
455
+ "unsafe_code" = "deny "
456
456
457
457
[profile.dev]
458
- rustflags = ["-D ", "unsafe_code"]
458
+ rustflags = ["-A ", "unsafe_code"]
459
459
"# ,
460
460
)
461
461
. file (
You can’t perform that action at this time.
0 commit comments