6346 Commits

Author SHA1 Message Date
Dale Wijnand
16681b3dfd
Migrate to crossbeam's new 0.4 API 2018-07-25 06:50:16 +01:00
dependabot[bot]
4b73ed06cb
Update crossbeam requirement to 0.4
Updates the requirements on [crossbeam](https://github.com/crossbeam-rs/crossbeam) to permit the latest version.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-07-25 05:31:03 +00:00
bors
4e53ce48d1 Auto merge of #5782 - dwijnand:dedup-manifest, r=alexcrichton
Add a default template for Cargo.toml

Fixes #5743

r? @alexcrichton
2018-07-24 20:47:57 +00:00
bors
5bb850141a Auto merge of #5621 - knight42:cargo-search-relaced-registry, r=alexcrichton
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.
2018-07-24 16:10:11 +00:00
Dale Wijnand
081e7930d2
Drop now unnecessary basic manifests 2018-07-24 16:33:55 +01:00
bors
f102a24cee Auto merge of #5757 - Eh2406:minimal-versions-build, r=alexcrichton
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
2018-07-24 15:11:36 +00:00
Eh2406
4a8c70ecc0 update curl so we don't need so may hacks 2018-07-24 10:41:10 -04:00
bors
5a386e91c6 Auto merge of #5779 - alexcrichton:msg, r=dwijnand
Fix a formatting of a cargo fix message

Something I saw in the report of https://github.com/rust-lang/cargo/issues/5775
2018-07-24 14:02:09 +00:00
Dale Wijnand
252f6e8e9f
Opt-out all other failing tests
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.
2018-07-24 13:59:42 +01:00
Dale Wijnand
d2c815be22
Add an opt-out to the auto-generated Cargo.toml 2018-07-24 13:19:47 +01:00
Dale Wijnand
2e6e5f880b
Insert a basic Cargo.toml if one is not defined. 2018-07-24 11:35:39 +01:00
Eh2406
2797f6c7b4 Use nightly for -Z but use MSRV=stable for test 2018-07-23 22:43:04 -04:00
Alex Crichton
32a28883a5 Fix a formatting of a cargo fix message 2018-07-23 15:00:28 -07:00
bors
773e3b6c6b Auto merge of #5774 - dwijnand:generate-lockfile-stutter, r=alexcrichton
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
2018-07-23 17:09:01 +00:00
Eh2406
3fa032bbf8 separate AppVeyor builder 2018-07-23 12:22:58 -04:00
bors
c744090a36 Auto merge of #5770 - alexcrichton:fix-no-warn-ignored, r=killercup
Don't warn about ignored files in cargo-fix

They're not being tracked, so no worries if we stomp over them!
2018-07-23 16:01:30 +00:00
Eh2406
16bbb950f7 separate Travis builder 2018-07-23 11:37:08 -04:00
Eh2406
96d3c05f84 typo 2018-07-23 10:42:36 -04:00
bors
c8dce5bd07 Auto merge of #5768 - dwijnand:clippy, r=Eh2406
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.
2018-07-23 14:36:48 +00:00
Alex Crichton
6cdee674fc Don't warn about ignored files in cargo-fix
They're not being tracked, so no worries if we stomp over them!
2018-07-23 07:33:51 -07:00
Dale Wijnand
7ef6976e1d
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
2018-07-23 15:23:57 +01:00
bors
f3d358168b Auto merge of #5773 - Metaswitch:cargo-owner-help, r=dwijnand
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
2018-07-23 14:02:12 +00:00
Benjamin Gill
1254975b29
Update cargo owner after_help text
Fix formatting and make some minor grammatical adjustments
2018-07-23 12:15:20 +01:00
Dale Wijnand
09111134f9
Add a link to the Clippy's false positive bug around boxed_local 2018-07-23 08:41:55 +01:00
Dale Wijnand
8dc00d45c1
Give an explanation for exempting implicit_hasher 2018-07-23 07:46:29 +01:00
Dale Wijnand
a8e3827e98
Give an explanation for exempting large_enum_variant 2018-07-23 07:46:26 +01:00
Dale Wijnand
44cb35905f
Document DepFingerprint 2018-07-23 07:27:07 +01:00
Dale Wijnand
93c8e8e3a2
Clarify why type_complexity is exempted in Profile::comparable 2018-07-23 07:02:13 +01:00
knight42
7d279fe85c test: add test for replaced source 2018-07-23 09:35:27 +08:00
knight42
5e680f2849 Only update the missing registry before search
And update the replaced registry specified in `.cargo/config`
2018-07-23 09:31:40 +08:00
bors
6b38295c3c Auto merge of #5762 - dwijnand:test-mod-reorg, r=alexcrichton
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..
2018-07-22 18:02:22 +00:00
Dale Wijnand
1d965018a4
Exempt a call from the redundant_closure linter
Removing the closure results in:

    error[E0631]: type mismatch in function arguments
       --> src/bin/cargo/main.rs:135:10
        |
    135 |         .find(is_executable);
        |          ^^^^ expected signature of `for<'r> fn(&'r std::path::PathBuf) -> _`
    ...
    170 | fn is_executable<P: AsRef<Path>>(path: P) -> bool {
        | ------------------------------------------------- found signature of `fn(_) -> _`

    error[E0271]: type mismatch resolving `for<'r> <fn(_) -> bool {is_executable::<_>} as std::ops::FnOnce<(&'r std::path::PathBuf,)>>::Output == bool`
       --> src/bin/cargo/main.rs:135:10
        |
    135 |         .find(is_executable);
        |          ^^^^ expected bound lifetime parameter, found concrete lifetime
2018-07-22 17:21:28 +01:00
Dale Wijnand
ed6f93a929
Resolve a unnecessary_mut_passed lint warning 2018-07-22 17:17:35 +01:00
Dale Wijnand
6b11e70192
Resolve 2 or_fun_call lint warnings 2018-07-22 17:17:32 +01:00
Dale Wijnand
0cb7c619f7
Resolve a identity_conversion lint warning 2018-07-22 17:15:08 +01:00
Dale Wijnand
293b2ada17
Resolve a nonminimal_bool lint warning 2018-07-22 17:14:32 +01:00
Dale Wijnand
1ca6830eec
Move the allow(too_many_arguments) to the bin main.rs 2018-07-22 17:13:57 +01:00
Dale Wijnand
8381bd4350
Resolve a needless_return lint warning 2018-07-22 17:11:49 +01:00
Dale Wijnand
d085b5e7af
Resolve a let_and_return lint warning 2018-07-22 17:11:19 +01:00
Dale Wijnand
137d5cd152
Resolve 2 needless_pass_by_value lint warnings 2018-07-22 17:10:20 +01:00
Dale Wijnand
2120dcd2ee
Exempt 2 functions from the implicit_hasher linter
(Couldn't figure out how to generalise over different hashers..)
2018-07-22 17:09:00 +01:00
Dale Wijnand
c3e9f8cd76
Exempt a type from the derive_hash_xor_eq linter 2018-07-22 17:08:59 +01:00
Dale Wijnand
a3c590957b
Resolve a should_implement_trait lint warning
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
2018-07-22 17:08:57 +01:00
Dale Wijnand
cf0209ab8e
Exempt 3 enums from the large_enum_variant linter
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>),
        |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2018-07-22 16:47:11 +01:00
Dale Wijnand
d4999dc894
Resolve a single_match lint warning 2018-07-22 14:56:01 +01:00
Dale Wijnand
53295b18cb
Exempt a method from the boxed_local linter
warning: local variable doesn't need to be boxed here
      --> src/cargo/core/compiler/job.rs:22:17
       |
    22 |     fn call_box(self: Box<F>, a: A) -> R {
       |                 ^^^^
       |
       = note: #[warn(boxed_local)] on by default
       = help: for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.212/index.html#boxed_local
2018-07-22 14:51:26 +01:00
Dale Wijnand
b6efcf41e0
Exempt a method from the type_complexity linter 2018-07-22 14:51:24 +01:00
Dale Wijnand
b91935f18f
Resolve 2 type_complexity lint warnings 2018-07-22 14:51:22 +01:00
Dale Wijnand
336ce24c13
Resolve a type_complexity lint warning 2018-07-22 14:51:19 +01:00
Dale Wijnand
195674bd8c
Resolve a useless_let_if_seq lint warning 2018-07-22 14:51:15 +01:00