@@ -308,30 +308,39 @@ fn test_search_paths_tracking_hash_different_order() {
308308 json_rendered : HumanReadableErrorType :: Default ( ColorConfig :: Never ) ,
309309 } ;
310310
311+ let push = |opts : & mut Options , search_path| {
312+ opts. search_paths . push ( SearchPath :: from_cli_opt (
313+ None ,
314+ & opts. target_triple ,
315+ & early_dcx,
316+ search_path,
317+ ) ) ;
318+ } ;
319+
311320 // Reference
312- v1 . search_paths . push ( SearchPath :: from_cli_opt ( & early_dcx , "native=abc" ) ) ;
313- v1 . search_paths . push ( SearchPath :: from_cli_opt ( & early_dcx , "crate=def" ) ) ;
314- v1 . search_paths . push ( SearchPath :: from_cli_opt ( & early_dcx , "dependency=ghi" ) ) ;
315- v1 . search_paths . push ( SearchPath :: from_cli_opt ( & early_dcx , "framework=jkl" ) ) ;
316- v1 . search_paths . push ( SearchPath :: from_cli_opt ( & early_dcx , "all=mno" ) ) ;
317-
318- v2 . search_paths . push ( SearchPath :: from_cli_opt ( & early_dcx , "native=abc" ) ) ;
319- v2 . search_paths . push ( SearchPath :: from_cli_opt ( & early_dcx , "dependency=ghi" ) ) ;
320- v2 . search_paths . push ( SearchPath :: from_cli_opt ( & early_dcx , "crate=def" ) ) ;
321- v2 . search_paths . push ( SearchPath :: from_cli_opt ( & early_dcx , "framework=jkl" ) ) ;
322- v2 . search_paths . push ( SearchPath :: from_cli_opt ( & early_dcx , "all=mno" ) ) ;
323-
324- v3 . search_paths . push ( SearchPath :: from_cli_opt ( & early_dcx , "crate=def" ) ) ;
325- v3 . search_paths . push ( SearchPath :: from_cli_opt ( & early_dcx , "framework=jkl" ) ) ;
326- v3 . search_paths . push ( SearchPath :: from_cli_opt ( & early_dcx , "native=abc" ) ) ;
327- v3 . search_paths . push ( SearchPath :: from_cli_opt ( & early_dcx , "dependency=ghi" ) ) ;
328- v3 . search_paths . push ( SearchPath :: from_cli_opt ( & early_dcx , "all=mno" ) ) ;
329-
330- v4 . search_paths . push ( SearchPath :: from_cli_opt ( & early_dcx , "all=mno" ) ) ;
331- v4 . search_paths . push ( SearchPath :: from_cli_opt ( & early_dcx , "native=abc" ) ) ;
332- v4 . search_paths . push ( SearchPath :: from_cli_opt ( & early_dcx , "crate=def" ) ) ;
333- v4 . search_paths . push ( SearchPath :: from_cli_opt ( & early_dcx , "dependency=ghi" ) ) ;
334- v4 . search_paths . push ( SearchPath :: from_cli_opt ( & early_dcx , "framework=jkl" ) ) ;
321+ push ( & mut v1 , "native=abc" ) ;
322+ push ( & mut v1 , "crate=def" ) ;
323+ push ( & mut v1 , "dependency=ghi" ) ;
324+ push ( & mut v1 , "framework=jkl" ) ;
325+ push ( & mut v1 , "all=mno" ) ;
326+
327+ push ( & mut v2 , "native=abc" ) ;
328+ push ( & mut v2 , "dependency=ghi" ) ;
329+ push ( & mut v2 , "crate=def" ) ;
330+ push ( & mut v2 , "framework=jkl" ) ;
331+ push ( & mut v2 , "all=mno" ) ;
332+
333+ push ( & mut v3 , "crate=def" ) ;
334+ push ( & mut v3 , "framework=jkl" ) ;
335+ push ( & mut v3 , "native=abc" ) ;
336+ push ( & mut v3 , "dependency=ghi" ) ;
337+ push ( & mut v3 , "all=mno" ) ;
338+
339+ push ( & mut v4 , "all=mno" ) ;
340+ push ( & mut v4 , "native=abc" ) ;
341+ push ( & mut v4 , "crate=def" ) ;
342+ push ( & mut v4 , "dependency=ghi" ) ;
343+ push ( & mut v4 , "framework=jkl" ) ;
335344
336345 assert_same_hash ( & v1, & v2) ;
337346 assert_same_hash ( & v1, & v3) ;
0 commit comments