We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bd6c81a commit b417701Copy full SHA for b417701
src/libsyntax/parse/parser.rs
@@ -6151,6 +6151,11 @@ impl<'a> Parser<'a> {
6151
pub fn submod_path_from_attr(attrs: &[Attribute], dir_path: &Path) -> Option<PathBuf> {
6152
if let Some(s) = attr::first_attr_value_str_by_name(attrs, "path") {
6153
let s = s.as_str();
6154
+
6155
+ // On windows, the base path might have the form
6156
+ // `\\?\foo\bar` in which case it does not tolerate
6157
+ // mixed `/` and `\` separators, so canonicalize
6158
+ // `/` to `\`.
6159
#[cfg(windows)]
6160
let s = s.replace("/", "\\");
6161
Some(dir_path.join(s))
0 commit comments