File tree Expand file tree Collapse file tree 2 files changed +10
-16
lines changed Expand file tree Collapse file tree 2 files changed +10
-16
lines changed Original file line number Diff line number Diff line change @@ -232,14 +232,11 @@ impl Config {
232
232
} )
233
233
. collect ( ) ;
234
234
235
- let upper_case_env = if cfg ! ( windows) {
236
- HashMap :: new ( )
237
- } else {
238
- env. clone ( )
239
- . into_iter ( )
240
- . map ( |( k, _) | ( k. to_uppercase ( ) . replace ( "-" , "_" ) , k) )
241
- . collect ( )
242
- } ;
235
+ let upper_case_env = env
236
+ . clone ( )
237
+ . into_iter ( )
238
+ . map ( |( k, _) | ( k. to_uppercase ( ) . replace ( "-" , "_" ) , k) )
239
+ . collect ( ) ;
243
240
244
241
let cache_rustc_info = match env. get ( "CARGO_CACHE_RUSTC_INFO" ) {
245
242
Some ( cache) => cache != "0" ,
@@ -696,12 +693,6 @@ impl Config {
696
693
}
697
694
698
695
fn check_environment_key_case_mismatch ( & self , key : & ConfigKey ) {
699
- if cfg ! ( windows) {
700
- // In the case of windows the check for case mismatch in keys can be skipped
701
- // as windows already converts its environment keys into the desired format.
702
- return ;
703
- }
704
-
705
696
if let Some ( env_key) = self . upper_case_env . get ( key. as_env_key ( ) ) {
706
697
let _ = self . shell ( ) . warn ( format ! (
707
698
"Environment variables are expected to use uppercase letters and underscores, \
Original file line number Diff line number Diff line change @@ -341,9 +341,12 @@ fn custom_linker_env() {
341
341
}
342
342
343
343
#[ cargo_test]
344
- // Temporarily disabled until https://github.com/rust-lang/rust/pull/85270 is in nightly.
345
- #[ cfg_attr( target_os = "windows" , ignore) ]
346
344
fn target_in_environment_contains_lower_case ( ) {
345
+ if cfg ! ( windows) && !cargo_test_support:: is_nightly ( ) {
346
+ // Remove this check when 1.55 is stabilized.
347
+ // https://github.com/rust-lang/rust/pull/85270
348
+ return ;
349
+ }
347
350
let p = project ( ) . file ( "src/main.rs" , "fn main() {}" ) . build ( ) ;
348
351
349
352
let target = rustc_host ( ) ;
You can’t perform that action at this time.
0 commit comments