@@ -35,9 +35,10 @@ impl HeadersCache {
3535/// the test.
3636#[ derive( Default ) ]
3737pub struct EarlyProps {
38- pub aux : Vec < String > ,
39- pub aux_bin : Vec < String > ,
40- pub aux_crate : Vec < ( String , String ) > ,
38+ /// Auxiliary crates that should be built and made available to this test.
39+ /// Included in [`EarlyProps`] so that the indicated files can participate
40+ /// in up-to-date checking. Building happens via [`TestProps::aux`] instead.
41+ pub ( crate ) aux : AuxProps ,
4142 pub revisions : Vec < String > ,
4243}
4344
@@ -57,21 +58,7 @@ impl EarlyProps {
5758 testfile,
5859 rdr,
5960 & mut |HeaderLine { directive : ln, .. } | {
60- config. push_name_value_directive ( ln, directives:: AUX_BUILD , & mut props. aux , |r| {
61- r. trim ( ) . to_string ( )
62- } ) ;
63- config. push_name_value_directive (
64- ln,
65- directives:: AUX_BIN ,
66- & mut props. aux_bin ,
67- |r| r. trim ( ) . to_string ( ) ,
68- ) ;
69- config. push_name_value_directive (
70- ln,
71- directives:: AUX_CRATE ,
72- & mut props. aux_crate ,
73- Config :: parse_aux_crate,
74- ) ;
61+ parse_and_update_aux ( config, ln, & mut props. aux ) ;
7562 config. parse_and_update_revisions ( ln, & mut props. revisions ) ;
7663 } ,
7764 ) ;
@@ -920,14 +907,6 @@ fn iter_header(
920907}
921908
922909impl Config {
923- fn parse_aux_crate ( r : String ) -> ( String , String ) {
924- let mut parts = r. trim ( ) . splitn ( 2 , '=' ) ;
925- (
926- parts. next ( ) . expect ( "missing aux-crate name (e.g. log=log.rs)" ) . to_string ( ) ,
927- parts. next ( ) . expect ( "missing aux-crate value (e.g. log=log.rs)" ) . to_string ( ) ,
928- )
929- }
930-
931910 fn parse_and_update_revisions ( & self , line : & str , existing : & mut Vec < String > ) {
932911 if let Some ( raw) = self . parse_name_value_directive ( line, "revisions" ) {
933912 let mut duplicates: HashSet < _ > = existing. iter ( ) . cloned ( ) . collect ( ) ;
0 commit comments