mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-21 22:34:05 +00:00
4d378f26a9
Fixup Windows verbatim paths when used with the `include!` macro On Windows, the following code can fail if the `OUT_DIR` environment variable is a [verbatim path](https://doc.rust-lang.org/std/path/enum.Prefix.html) (i.e. begins with `\\?\`): ```rust include!(concat!(env!("OUT_DIR"), "/src/repro.rs")); ``` This is because verbatim paths treat `/` literally, as if it were just another character in the file name. The good news is that the standard library already has code to fix this. We can simply use `components` to normalize the path so it works as intended. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
messages.ftl |