@@ -56,8 +56,6 @@ enum SubModKind<'a, 'ast> {
56
56
External ( PathBuf , DirectoryOwnership , Cow < ' ast , ast:: Mod > ) ,
57
57
/// `mod foo;` with multiple sources.
58
58
MultiExternal ( Vec < ( PathBuf , DirectoryOwnership , Cow < ' ast , ast:: Mod > ) > ) ,
59
- /// `#[path = "..."] mod foo {}`
60
- InternalWithPath ( PathBuf ) ,
61
59
/// `mod foo {}`
62
60
Internal ( & ' a ast:: Item ) ,
63
61
}
@@ -173,12 +171,7 @@ impl<'ast, 'sess, 'c> ModResolver<'ast, 'sess> {
173
171
self . find_external_module ( item. ident , & item. attrs , sub_mod)
174
172
} else {
175
173
// An internal module (`mod foo { /* ... */ }`);
176
- if let Some ( path) = find_path_value ( & item. attrs ) {
177
- let path = Path :: new ( & * path. as_str ( ) ) . to_path_buf ( ) ;
178
- Ok ( Some ( SubModKind :: InternalWithPath ( path) ) )
179
- } else {
180
- Ok ( Some ( SubModKind :: Internal ( item) ) )
181
- }
174
+ Ok ( Some ( SubModKind :: Internal ( item) ) )
182
175
}
183
176
}
184
177
@@ -218,14 +211,6 @@ impl<'ast, 'sess, 'c> ModResolver<'ast, 'sess> {
218
211
} ;
219
212
self . visit_sub_mod_after_directory_update ( sub_mod, Some ( directory) )
220
213
}
221
- SubModKind :: InternalWithPath ( mod_path) => {
222
- // All `#[path]` files are treated as though they are a `mod.rs` file.
223
- let directory = Directory {
224
- path : mod_path,
225
- ownership : DirectoryOwnership :: Owned { relative : None } ,
226
- } ;
227
- self . visit_sub_mod_after_directory_update ( sub_mod, Some ( directory) )
228
- }
229
214
SubModKind :: Internal ( ref item) => {
230
215
self . push_inline_mod_directory ( item. ident , & item. attrs ) ;
231
216
self . visit_sub_mod_after_directory_update ( sub_mod, None )
0 commit comments