@@ -315,30 +315,39 @@ fn test_search_paths_tracking_hash_different_order() {
315315 json_rendered : HumanReadableErrorType :: Default ( ColorConfig :: Never ) ,
316316 } ;
317317
318+ let push = |opts : & mut Options , search_path| {
319+ opts. search_paths . push ( SearchPath :: from_cli_opt (
320+ None ,
321+ & opts. target_triple ,
322+ & early_dcx,
323+ search_path,
324+ ) ) ;
325+ } ;
326+
318327 // Reference
319- v1 . search_paths . push ( SearchPath :: from_cli_opt ( & early_dcx , "native=abc" ) ) ;
320- v1 . search_paths . push ( SearchPath :: from_cli_opt ( & early_dcx , "crate=def" ) ) ;
321- v1 . search_paths . push ( SearchPath :: from_cli_opt ( & early_dcx , "dependency=ghi" ) ) ;
322- v1 . search_paths . push ( SearchPath :: from_cli_opt ( & early_dcx , "framework=jkl" ) ) ;
323- v1 . search_paths . push ( SearchPath :: from_cli_opt ( & early_dcx , "all=mno" ) ) ;
324-
325- v2 . search_paths . push ( SearchPath :: from_cli_opt ( & early_dcx , "native=abc" ) ) ;
326- v2 . search_paths . push ( SearchPath :: from_cli_opt ( & early_dcx , "dependency=ghi" ) ) ;
327- v2 . search_paths . push ( SearchPath :: from_cli_opt ( & early_dcx , "crate=def" ) ) ;
328- v2 . search_paths . push ( SearchPath :: from_cli_opt ( & early_dcx , "framework=jkl" ) ) ;
329- v2 . search_paths . push ( SearchPath :: from_cli_opt ( & early_dcx , "all=mno" ) ) ;
330-
331- v3 . search_paths . push ( SearchPath :: from_cli_opt ( & early_dcx , "crate=def" ) ) ;
332- v3 . search_paths . push ( SearchPath :: from_cli_opt ( & early_dcx , "framework=jkl" ) ) ;
333- v3 . search_paths . push ( SearchPath :: from_cli_opt ( & early_dcx , "native=abc" ) ) ;
334- v3 . search_paths . push ( SearchPath :: from_cli_opt ( & early_dcx , "dependency=ghi" ) ) ;
335- v3 . search_paths . push ( SearchPath :: from_cli_opt ( & early_dcx , "all=mno" ) ) ;
336-
337- v4 . search_paths . push ( SearchPath :: from_cli_opt ( & early_dcx , "all=mno" ) ) ;
338- v4 . search_paths . push ( SearchPath :: from_cli_opt ( & early_dcx , "native=abc" ) ) ;
339- v4 . search_paths . push ( SearchPath :: from_cli_opt ( & early_dcx , "crate=def" ) ) ;
340- v4 . search_paths . push ( SearchPath :: from_cli_opt ( & early_dcx , "dependency=ghi" ) ) ;
341- v4 . search_paths . push ( SearchPath :: from_cli_opt ( & early_dcx , "framework=jkl" ) ) ;
328+ push ( & mut v1 , "native=abc" ) ;
329+ push ( & mut v1 , "crate=def" ) ;
330+ push ( & mut v1 , "dependency=ghi" ) ;
331+ push ( & mut v1 , "framework=jkl" ) ;
332+ push ( & mut v1 , "all=mno" ) ;
333+
334+ push ( & mut v2 , "native=abc" ) ;
335+ push ( & mut v2 , "dependency=ghi" ) ;
336+ push ( & mut v2 , "crate=def" ) ;
337+ push ( & mut v2 , "framework=jkl" ) ;
338+ push ( & mut v2 , "all=mno" ) ;
339+
340+ push ( & mut v3 , "crate=def" ) ;
341+ push ( & mut v3 , "framework=jkl" ) ;
342+ push ( & mut v3 , "native=abc" ) ;
343+ push ( & mut v3 , "dependency=ghi" ) ;
344+ push ( & mut v3 , "all=mno" ) ;
345+
346+ push ( & mut v4 , "all=mno" ) ;
347+ push ( & mut v4 , "native=abc" ) ;
348+ push ( & mut v4 , "crate=def" ) ;
349+ push ( & mut v4 , "dependency=ghi" ) ;
350+ push ( & mut v4 , "framework=jkl" ) ;
342351
343352 assert_same_hash ( & v1, & v2) ;
344353 assert_same_hash ( & v1, & v3) ;
0 commit comments