@@ -1015,7 +1015,7 @@ impl<'test> TestCx<'test> {
10151015 assert_eq ! ( kind, DocKind :: Html , "build-aux-docs only make sense for html output" ) ;
10161016
10171017 for rel_ab in & self . props . aux . builds {
1018- let aux_path = self . compute_aux_test_paths ( rel_ab) ;
1018+ let aux_path = self . resolve_aux_path ( rel_ab) ;
10191019 let props_for_aux = self . props . from_aux_file ( & aux_path, self . revision , self . config ) ;
10201020 let aux_cx = TestCx {
10211021 config : self . config ,
@@ -1198,19 +1198,21 @@ impl<'test> TestCx<'test> {
11981198
11991199 /// For each `aux-build: foo/bar` annotation, we check to find the file in an `auxiliary`
12001200 /// directory relative to the test itself (not any intermediate auxiliaries).
1201- fn compute_aux_test_paths ( & self , rel_ab : & str ) -> Utf8PathBuf {
1202- let test_ab = self
1201+ fn resolve_aux_path ( & self , relative_aux_path : & str ) -> Utf8PathBuf {
1202+ let aux_path = self
12031203 . testpaths
12041204 . file
12051205 . parent ( )
12061206 . expect ( "test file path has no parent" )
12071207 . join ( "auxiliary" )
1208- . join ( rel_ab) ;
1209- if !test_ab. exists ( ) {
1210- self . fatal ( & format ! ( "aux-build `{}` source not found" , test_ab) )
1208+ . join ( relative_aux_path) ;
1209+ if !aux_path. exists ( ) {
1210+ self . fatal ( & format ! (
1211+ "auxiliary source file `{relative_aux_path}` not found at `{aux_path}`"
1212+ ) ) ;
12111213 }
12121214
1213- test_ab
1215+ aux_path
12141216 }
12151217
12161218 fn is_vxworks_pure_static ( & self ) -> bool {
@@ -1361,7 +1363,7 @@ impl<'test> TestCx<'test> {
13611363 aux_dir : & Utf8Path ,
13621364 aux_type : Option < AuxType > ,
13631365 ) -> AuxType {
1364- let aux_path = self . compute_aux_test_paths ( source_path) ;
1366+ let aux_path = self . resolve_aux_path ( source_path) ;
13651367 let mut aux_props = self . props . from_aux_file ( & aux_path, self . revision , self . config ) ;
13661368 if aux_type == Some ( AuxType :: ProcMacro ) {
13671369 aux_props. force_host = true ;
0 commit comments