@@ -154,7 +154,7 @@ impl<'ast, 'sess, 'c> ModResolver<'ast, 'sess> {
154154 } else {
155155 // An internal module (`mod foo { /* ... */ }`);
156156 if let Some ( path) = find_path_value ( & item. attrs ) {
157- let path = Path :: new ( & path. as_str ( ) ) . to_path_buf ( ) ;
157+ let path = Path :: new ( & * path. as_str ( ) ) . to_path_buf ( ) ;
158158 Ok ( Some ( SubModKind :: InternalWithPath ( path) ) )
159159 } else {
160160 Ok ( Some ( SubModKind :: Internal ( item) ) )
@@ -288,7 +288,7 @@ impl<'ast, 'sess, 'c> ModResolver<'ast, 'sess> {
288288
289289 fn push_inline_mod_directory ( & mut self , id : ast:: Ident , attrs : & [ ast:: Attribute ] ) {
290290 if let Some ( path) = find_path_value ( attrs) {
291- self . directory . path . push ( & path. as_str ( ) ) ;
291+ self . directory . path . push ( & * path. as_str ( ) ) ;
292292 self . directory . ownership = DirectoryOwnership :: Owned { relative : None } ;
293293 } else {
294294 // We have to push on the current module name in the case of relative
@@ -300,10 +300,10 @@ impl<'ast, 'sess, 'c> ModResolver<'ast, 'sess> {
300300 if let DirectoryOwnership :: Owned { relative } = & mut self . directory . ownership {
301301 if let Some ( ident) = relative. take ( ) {
302302 // remove the relative offset
303- self . directory . path . push ( ident. as_str ( ) ) ;
303+ self . directory . path . push ( & * ident. as_str ( ) ) ;
304304 }
305305 }
306- self . directory . path . push ( & id. as_str ( ) ) ;
306+ self . directory . path . push ( & * id. as_str ( ) ) ;
307307 }
308308 }
309309
0 commit comments