Skip to content

Commit 0103308

Browse files
committed
Account for raw idents in module file finding
1 parent b5ad0cb commit 0103308

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/librustc_parse/parser/module.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,13 +212,13 @@ impl<'a> Parser<'a> {
212212
// `./<id>.rs` and `./<id>/mod.rs`.
213213
let relative_prefix_string;
214214
let relative_prefix = if let Some(ident) = relative {
215-
relative_prefix_string = format!("{}{}", ident, path::MAIN_SEPARATOR);
215+
relative_prefix_string = format!("{}{}", ident.name, path::MAIN_SEPARATOR);
216216
&relative_prefix_string
217217
} else {
218218
""
219219
};
220220

221-
let mod_name = id.to_string();
221+
let mod_name = id.name.to_string();
222222
let default_path_str = format!("{}{}.rs", relative_prefix, mod_name);
223223
let secondary_path_str = format!("{}{}{}mod.rs",
224224
relative_prefix, mod_name, path::MAIN_SEPARATOR);

0 commit comments

Comments
 (0)