Update replaced registry before search
Close#5550.
It seems that updating the replaced registry before search has not been well considered in cargo and I have to add a function to trait `core::source::Source` to get the replaced `SourceId`.
I am not sure whether this is a good design, any advice is welcome.
Minimal versions build
This is a conceptual rebase of #5275, to reiterate:
Big thanks to @klausi for doing most of the work!
Thanks to @matklad for pointing out that we could finish it.
I don't know if I have the Travis config quite correct, advice definitely wellcome!
edit: closes#5275
Looks like cargo traverses the filesystem & fails if it runs into a
Cargo.toml that doesn't declare a target. I couldn't find a nice way to
re-engineer the test to avoid this issue. So I'll leave that as someone
else's exercise.
Drop after_help in generate-lockfile
From reviewing the history this looks like a copy-paste error while
porting to clap (https://github.com/rust-lang/cargo/pull/5152): this is
fetch's after_help info
Fixes#5692
Resolve or exempt the remaining Clippy errors & warnings
With these changes Clippy runs cleanly now, i.e returns no warnings or errors.
Happy to tweak any details here, these are just my opening ideas on how to resolve these.
Update cargo owner `after_help` text
Fix formatting and make some minor grammatical adjustments. Also update the URL for more information to its new version.
Fixes#5772
Reorganise the testsuite crate module hierarchy
* Collapse the nested cargotest::support module into the cargotest
module (merge the mod.rs's)
* Rename the cargotest module to support
* Nest the top-level hamcrest module into support
Fixes#5744
I apologise ahead-of-time to the authors of the PRs this is going to break..
Rather than the FromStr recommendation, resolves it using From and .into().
warning: defining a method called `from_str` on this type; consider implementing the `std::str::FromStr` trait or choosing a less ambiguous name
--> src/cargo/core/manifest.rs:105:5
|
105 | / pub fn from_str(string: &str) -> LibKind {
106 | | match string {
107 | | "lib" => LibKind::Lib,
108 | | "rlib" => LibKind::Rlib,
... |
112 | | }
113 | | }
| |_____^
|
= note: #[warn(should_implement_trait)] on by default
= help: for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.212/index.html#should_implement_trait
Exempt as opposed to box, like suggested:
warning: large size difference between variants
--> src/cargo/core/manifest.rs:21:5
|
21 | Real(Manifest),
| ^^^^^^^^^^^^^^
|
= note: #[warn(large_enum_variant)] on by default
= help: for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.212/index.html#large_enum_variant
help: consider boxing the large fields to reduce the total size of the enum
|
21 | Real(Box<Manifest>),
| ^^^^^^^^^^^^^
warning: large size difference between variants
--> src/cargo/core/workspace.rs:91:5
|
91 | Package(Package),
| ^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.212/index.html#large_enum_variant
help: consider boxing the large fields to reduce the total size of the enum
|
91 | Package(Box<Package>),
| ^^^^^^^^^^^^
warning: large size difference between variants
--> src/cargo/util/toml/mod.rs:156:5
|
156 | Detailed(DetailedTomlDependency),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.212/index.html#large_enum_variant
help: consider boxing the large fields to reduce the total size of the enum
|
156 | Detailed(Box<DetailedTomlDependency>),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^