Skip to content

Commit

Permalink
Account for raw idents in module file finding
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed Dec 4, 2019
1 parent b5ad0cb commit 0103308
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/librustc_parse/parser/module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,13 @@ impl<'a> Parser<'a> {
// `./<id>.rs` and `./<id>/mod.rs`.
let relative_prefix_string;
let relative_prefix = if let Some(ident) = relative {
relative_prefix_string = format!("{}{}", ident, path::MAIN_SEPARATOR);
relative_prefix_string = format!("{}{}", ident.name, path::MAIN_SEPARATOR);
&relative_prefix_string
} else {
""
};

let mod_name = id.to_string();
let mod_name = id.name.to_string();
let default_path_str = format!("{}{}.rs", relative_prefix, mod_name);
let secondary_path_str = format!("{}{}{}mod.rs",
relative_prefix, mod_name, path::MAIN_SEPARATOR);
Expand Down

0 comments on commit 0103308

Please sign in to comment.