PrefixComponent
cannot be constructed in any way
#83578
Labels
A-io
Area: `std::io`, `std::fs`, `std::net` and `std::path`
C-feature-request
Category: A feature request, i.e: not implemented / a PR.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
I need to pass a canonicalized path to
cl.exe
:https://github.com/google/autocxx/blob/78965991ba04e6c9383920e9c4275deaa808a7a5/demo/build.rs#L19
Path::canonicalize
returns\\?\C:\foo\bar
instead ofC:\foo\bar
, whichcl.exe
doesn't interpret correctly (it's as if I hadn't passed that include path).So I need to strip the prefix. It seems the way to do it, is like this:
But I need to map a
PrefixComponent
to aPrefixComponent
, and there is no public constructor for it!https://doc.rust-lang.org/stable/std/path/struct.PrefixComponent.html
So this code doesn't work:
Can you please add a constructor for it?
And maybe also a method to canonicalize a
Path
without adding such a prefix?The text was updated successfully, but these errors were encountered: