@@ -119,8 +119,8 @@ impl EarlyLintPass for ModStyle {
119119 Span :: new ( file. start_pos , file. start_pos , SyntaxContext :: root ( ) , None ) ,
120120 |build| {
121121 let mut lint =
122- build. build ( & format ! ( "`mod.rs` files are required, found `{}`" , path. display( ) ) ) ;
123- lint. help ( & format ! ( "move `{}` to `{}`" , path. display( ) , correct. display( ) , ) ) ;
122+ build. build ( format ! ( "`mod.rs` files are required, found `{}`" , path. display( ) ) ) ;
123+ lint. help ( format ! ( "move `{}` to `{}`" , path. display( ) , correct. display( ) , ) ) ;
124124 lint. emit ( ) ;
125125 } ,
126126 ) ;
@@ -157,8 +157,8 @@ fn check_self_named_mod_exists(cx: &EarlyContext<'_>, path: &Path, file: &Source
157157 MOD_MODULE_FILES ,
158158 Span :: new ( file. start_pos , file. start_pos , SyntaxContext :: root ( ) , None ) ,
159159 |build| {
160- let mut lint = build. build ( & format ! ( "`mod.rs` files are not allowed, found `{}`" , path. display( ) ) ) ;
161- lint. help ( & format ! ( "move `{}` to `{}`" , path. display( ) , mod_file. display( ) , ) ) ;
160+ let mut lint = build. build ( format ! ( "`mod.rs` files are not allowed, found `{}`" , path. display( ) ) ) ;
161+ lint. help ( format ! ( "move `{}` to `{}`" , path. display( ) , mod_file. display( ) , ) ) ;
162162 lint. emit ( ) ;
163163 } ,
164164 ) ;
0 commit comments