add an explanatory comment
This commit is contained in:
parent
bd6c81aebb
commit
b417701ac1
1 changed files with 5 additions and 0 deletions
|
@ -6151,6 +6151,11 @@ impl<'a> Parser<'a> {
|
|||
pub fn submod_path_from_attr(attrs: &[Attribute], dir_path: &Path) -> Option<PathBuf> {
|
||||
if let Some(s) = attr::first_attr_value_str_by_name(attrs, "path") {
|
||||
let s = s.as_str();
|
||||
|
||||
// On windows, the base path might have the form
|
||||
// `\\?\foo\bar` in which case it does not tolerate
|
||||
// mixed `/` and `\` separators, so canonicalize
|
||||
// `/` to `\`.
|
||||
#[cfg(windows)]
|
||||
let s = s.replace("/", "\\");
|
||||
Some(dir_path.join(s))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue