Fix target for doc test cross compilation
- for target paths `Compilation::target` only contains the shortened file name, but we need to pass the full path to rustdoc
Add note about .cargo/config support.
I think it would be good to have some mention that Cargo also supports `.cargo/config` files. This is still the predominant way Cargo is used, and there is a ton of documentation, projects, and examples that still use the old form.
Fix pdb uplift when executable has dashes.
Windows `.pdb` files were not being uplifted for executables with dashes in their name. `rustc` calls the linker with the crate name (with underscores), which creates a pdb with underscores. Cargo renames the executable (`foo_bar.exe` to `foo-bar.exe`), and it was expecting the pdb to have the same form, but it doesn't.
Note: There shouldn't be any effect for using a debugger. Because the pdb path is embedded in the executable, the debugger was already looking in the `deps/` folder. Uplifting is only useful if you want to copy the exe/pdb pair to some other machine. In that case, it looks in the same directory as the `exe` for the pdb file.
Fixes#8117
Hint upgrading for future edition keys
A more specific error message for potentially-future edition values.
This error is likely to be seen by people who are not regular Rust users and are just trying to build someone's crate. It may be helpful to stronger hint at upgrading Cargo, rather than display a more general message about an unknown value.
I know Cargo plans to fix it better with explicit MSRV eventually, but that's not ready yet, so it's better to land something sooner.
Use some fs shorthand functions.
This is just some cleanup, using some fs convenience functions that I think make the code more readable.
Note: While going through these, I found the `out_dir_is_preserved` test was broken and not doing what it was supposed to.
Update documentation to mention "config.toml" instead of "config"
I searched for the reference of `config` and `credentials` in `src/doc` and changed to `config.toml` and `credentials.toml` accroding to the context.
#7323
Cargo now support loading 'config.toml' and 'credentials.toml' in place of the same files without extension, which used to be the default. Files with extensions are easier for people to edit due to syntax highlighting, etc.
Don't use debug display for error object.
When `cargo new` displays a workspace validation warning, it was using the debug display which we probably shouldn't rely on.
This also consolidates a similar usage when `cargo doc --open` fails.
Closes#8118
Add backwards-compatibility for old cargo-tree flags.
Add backwards compatibility for the flags that were removed.
`--invert` is still not backwards compatible because it was fundamentally changed to take an argument.
Requested via https://github.com/rust-lang/cargo/pull/8062#issuecomment-613829752.
Try to avoid panics on buggy (?) clocks
Try to avoid panics with `Instant` by only performing infallible
operations. This tweaks a comparison located in #8042 to use `Instant`
comparisons rather than `Duration` comparisons which should hopefully
eliminate a source of panics in the face of buggy (maybe?) clocks.
I'm not sure whether this actually fixes the original issue, but seeing
that we have a pretty low chance of the issue recurring, it's probably
fine to go ahead and say...
Closes#8042
Try to avoid panics with `Instant` by only performing infallible
operations. This tweaks a comparison located in #8042 to use `Instant`
comparisons rather than `Duration` comparisons which should hopefully
eliminate a source of panics in the face of buggy (maybe?) clocks.
I'm not sure whether this actually fixes the original issue, but seeing
that we have a pretty low chance of the issue recurring, it's probably
fine to go ahead and say...
Closes#8042
Update dependencies to support illumos target
Several dependencies of cargo require updates in order to build with illumos as the `target_os` platform (rust-lang/rust#55553). Most are patch revisions to include `#[cfg()]` updates. In the case of `fs2`, the maintainer does not appear to be minding activity on the project, so it was forked into `fs3`, maintaining the same interfaces and logic (but featuring the widened platform support).