Auto merge of #132035 - matthiaskrgr:rollup-ty1e4q0, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #125205 (Fixup Windows verbatim paths when used with the `include!` macro) - #131049 (Validate args are correct for `UnevaluatedConst`, `ExistentialTraitRef`/`ExistentialProjection`) - #131549 (Add a note for `?` on a `impl Future<Output = Result<..>>` in sync function) - #131731 (add `TestFloatParse` to `tools.rs` for bootstrap) - #131732 (Add doc(plugins), doc(passes), etc. to INVALID_DOC_ATTRIBUTES) - #132006 (don't stage-off to previous compiler when CI rustc is available) - #132022 (Move `cmp_in_dominator_order` out of graph dominator computation) - #132033 (compiletest: Make `line_directive` return a `DirectiveLine`) r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
86d69c705a
35 changed files with 475 additions and 255 deletions
|
@ -1,5 +1,6 @@
|
|||
use std::default::Default;
|
||||
use std::iter;
|
||||
use std::path::Component::Prefix;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::rc::Rc;
|
||||
|
||||
|
@ -1293,7 +1294,12 @@ pub fn resolve_path(sess: &Session, path: impl Into<PathBuf>, span: Span) -> PRe
|
|||
base_path.push(path);
|
||||
Ok(base_path)
|
||||
} else {
|
||||
Ok(path)
|
||||
// This ensures that Windows verbatim paths are fixed if mixed path separators are used,
|
||||
// which can happen when `concat!` is used to join paths.
|
||||
match path.components().next() {
|
||||
Some(Prefix(prefix)) if prefix.kind().is_verbatim() => Ok(path.components().collect()),
|
||||
_ => Ok(path),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue