@@ -37,7 +37,7 @@ pub enum ModError<'a> {
3737 CircularInclusion ( Vec < PathBuf > ) ,
3838 ModInBlock ( Option < Ident > ) ,
3939 FileNotFound ( Ident , PathBuf ) ,
40- MultipleCandidates ( Ident , String , String ) ,
40+ MultipleCandidates ( Ident , PathBuf , PathBuf ) ,
4141 ParserError ( DiagnosticBuilder < ' a > ) ,
4242}
4343
@@ -220,9 +220,7 @@ pub fn default_submod_path<'a>(
220220 dir_ownership : DirOwnership :: Owned { relative : None } ,
221221 } ) ,
222222 ( false , false ) => Err ( ModError :: FileNotFound ( ident, default_path) ) ,
223- ( true , true ) => {
224- Err ( ModError :: MultipleCandidates ( ident, default_path_str, secondary_path_str) )
225- }
223+ ( true , true ) => Err ( ModError :: MultipleCandidates ( ident, default_path, secondary_path) ) ,
226224 }
227225}
228226
@@ -264,15 +262,15 @@ impl ModError<'_> {
264262 ) ) ;
265263 err
266264 }
267- ModError :: MultipleCandidates ( ident, default_path_short , secondary_path_short ) => {
265+ ModError :: MultipleCandidates ( ident, default_path , secondary_path ) => {
268266 let mut err = struct_span_err ! (
269267 diag,
270268 span,
271269 E0761 ,
272270 "file for module `{}` found at both \" {}\" and \" {}\" " ,
273271 ident,
274- default_path_short ,
275- secondary_path_short ,
272+ default_path . display ( ) ,
273+ secondary_path . display ( ) ,
276274 ) ;
277275 err. help ( "delete or rename one of them to remove the ambiguity" ) ;
278276 err
0 commit comments