]> git.proxmox.com Git - cargo.git/log
cargo.git
6 years agoExempt 3 enums from the large_enum_variant linter
Dale Wijnand [Sun, 22 Jul 2018 14:05:31 +0000 (15:05 +0100)]
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>),
        |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^

6 years agoResolve a single_match lint warning
Dale Wijnand [Sun, 22 Jul 2018 13:56:01 +0000 (14:56 +0100)]
Resolve a single_match lint warning

6 years agoExempt a method from the boxed_local linter
Dale Wijnand [Sun, 22 Jul 2018 13:49:32 +0000 (14:49 +0100)]
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

6 years agoExempt a method from the type_complexity linter
Dale Wijnand [Sun, 22 Jul 2018 13:37:27 +0000 (14:37 +0100)]
Exempt a method from the type_complexity linter

6 years agoResolve 2 type_complexity lint warnings
Dale Wijnand [Sun, 22 Jul 2018 13:34:56 +0000 (14:34 +0100)]
Resolve 2 type_complexity lint warnings

6 years agoResolve a type_complexity lint warning
Dale Wijnand [Sun, 22 Jul 2018 08:30:55 +0000 (09:30 +0100)]
Resolve a type_complexity lint warning

6 years agoResolve a useless_let_if_seq lint warning
Dale Wijnand [Sun, 22 Jul 2018 08:21:37 +0000 (09:21 +0100)]
Resolve a useless_let_if_seq lint warning

6 years agoAuto merge of #5765 - ehuss:rustdoc-cap-lints, r=alexcrichton
bors [Sun, 22 Jul 2018 03:55:56 +0000 (03:55 +0000)]
Auto merge of #5765 - ehuss:rustdoc-cap-lints, r=alexcrichton

Support --cap-lints in rustdoc.

Fixes #5749.

6 years agoSupport --cap-lints in rustdoc.
Eric Huss [Sat, 21 Jul 2018 05:25:02 +0000 (22:25 -0700)]
Support --cap-lints in rustdoc.

6 years agoAuto merge of #5763 - ehuss:pkg-modify-mac, r=alexcrichton
bors [Sun, 22 Jul 2018 02:13:12 +0000 (02:13 +0000)]
Auto merge of #5763 - ehuss:pkg-modify-mac, r=alexcrichton

Fix flakey test on MacOS.

`do_not_package_if_src_was_modified` can fail if the test runs too quickly
due to mac's filesystem time resolution.

6 years agoAuto merge of #5756 - Eh2406:clippy, r=alexcrichton
bors [Sun, 22 Jul 2018 00:56:04 +0000 (00:56 +0000)]
Auto merge of #5756 - Eh2406:clippy, r=alexcrichton

a large number of clippy suggestions

Just doing small things that clippy told me to.

6 years agoFix flakey test on MacOS.
Eric Huss [Sun, 22 Jul 2018 00:27:34 +0000 (17:27 -0700)]
Fix flakey test on MacOS.

`do_not_package_if_src_was_modified` can fail if the test runs too quickly
due to mac's filesystem time resolution.

6 years agoAuto merge of #5751 - RalfJung:default-run, r=alexcrichton
bors [Sat, 21 Jul 2018 23:03:13 +0000 (23:03 +0000)]
Auto merge of #5751 - RalfJung:default-run, r=alexcrichton

cargo run: on nightly, advertise the default-run feature

6 years agofix import for unix
Eh2406 [Fri, 20 Jul 2018 21:42:05 +0000 (17:42 -0400)]
fix import for unix

6 years agowe did not need a &(||...) we can just add a & at use
Eh2406 [Fri, 20 Jul 2018 21:27:36 +0000 (17:27 -0400)]
we did not need a &(||...) we can just add a & at use

6 years agomore general update
Eh2406 [Fri, 20 Jul 2018 21:24:33 +0000 (17:24 -0400)]
more general update

6 years agotypo
Eh2406 [Fri, 20 Jul 2018 21:21:28 +0000 (17:21 -0400)]
typo

6 years agoa large number of clippy suggestions
Eh2406 [Fri, 20 Jul 2018 19:39:05 +0000 (15:39 -0400)]
a large number of clippy suggestions

6 years agoAuto merge of #5761 - dwijnand:project-food, r=alexcrichton
bors [Sat, 21 Jul 2018 20:22:51 +0000 (20:22 +0000)]
Auto merge of #5761 - dwijnand:project-food, r=alexcrichton

Rework some test projects to use the "foo" default

Generally that means either switching "foo" and "bar" around (reversing
the arrow), or it means push "foo" to "bar" (and sometimes "bar" to
"baz", etc..) to free up "foo".

For trivia that leaves 80/1222 outliers, therefore 93.4% of test
project use the default. :)

Refs #5746

6 years agoRework some test projects to use the "foo" default
Dale Wijnand [Fri, 20 Jul 2018 17:41:44 +0000 (18:41 +0100)]
Rework some test projects to use the "foo" default

Generally that means either switching "foo" and "bar" around (reversing
the arrow), or it means push "foo" to "bar" (and sometimes "bar" to
"baz", etc..) to free up "foo".

For trivia that leaves 80/1222 outliers, therefore 93.4% of test
project use the default. :)

6 years agoAuto merge of #5752 - dwijnand:project_at, r=alexcrichton
bors [Fri, 20 Jul 2018 16:42:57 +0000 (16:42 +0000)]
Auto merge of #5752 - dwijnand:project_at, r=alexcrichton

Remove the argument from the `project` test support function

By rewriting the tests, with rerast (https://github.com/google/rerast), to
use the newly introduced "at" method.

First I added the following temporary function to cargotest::support:

    pub fn project_foo() -> ProjectBuilder {
       project("foo")
    }

Then I defined the following rewrite.rs:

    use cargotest::support::{ project, project_foo };

    fn rule1(a: &'static str) {
       replace!(project("foo") => project_foo());
       replace!(project(a) => project_foo().at(a));
    }

Then I ran rerast:

    cargo +nightly rerast --rules_file=rewrite.rs --force --targets tests --file tests/testsuite/main.rs

Finally I searched and replaced the references to project_foo with
argument-less project (a little awkardly on macOS with a git clean).

    find tests -type f -exec sed -i -e 's/project_foo/project/g' {} +
    git clean -d tests

Fixes #5746

6 years agoMigrate trailing calls to `project` with an argument
Dale Wijnand [Fri, 20 Jul 2018 14:25:51 +0000 (15:25 +0100)]
Migrate trailing calls to `project` with an argument

.. in docs, commented code & tests targetting non-macos.

6 years agoRemove the argument from the `project` test support function
Dale Wijnand [Fri, 20 Jul 2018 11:47:47 +0000 (12:47 +0100)]
Remove the argument from the `project` test support function

By rewriting the tests, with rerast (https://github.com/google/rerast),
to use the newly introduced "at" method.

First I added the following temporary function to cargotest::support:

    pub fn project_foo() -> ProjectBuilder {
        project("foo")
    }

Then I defined the following rewrite.rs:

    use cargotest::support::{ project, project_foo };

    fn rule1(a: &'static str) {
        replace!(project("foo") => project_foo());
        replace!(project(a) => project_foo().at(a));
    }

Then I ran rerast:

    cargo +nightly rerast --rules_file=rewrite.rs --force --targets tests --file tests/testsuite/main.rs

Finally I searched and replaced the references to project_foo with
argument-less project (a little awkardly on macOS with a git clean).

    find tests -type f -exec sed -i -e 's/project_foo/project/g' {} +
    git clean -d tests

6 years agocargo run: on nightly, advertise the default-run feature
Ralf Jung [Fri, 20 Jul 2018 10:48:47 +0000 (12:48 +0200)]
cargo run: on nightly, advertise the default-run feature

6 years agoAdd tests/ProjectBuilder::at
Dale Wijnand [Thu, 19 Jul 2018 12:55:39 +0000 (13:55 +0100)]
Add tests/ProjectBuilder::at

6 years agoAuto merge of #5741 - rust-lang:dependabot/cargo/termcolor-1.0, r=alexcrichton
bors [Wed, 18 Jul 2018 14:56:41 +0000 (14:56 +0000)]
Auto merge of #5741 - rust-lang:dependabot/cargo/termcolor-1.0, r=alexcrichton

Update termcolor requirement to 1.0

Updates the requirements on [termcolor](https://github.com/BurntSushi/termcolor) to permit the latest version.
<details>
<summary>Commits</summary>

- See full diff in [compare view](https://github.com/BurntSushi/termcolor/commits/wincolor-1.0.0)
</details>
<br />

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot ignore this [patch|minor|major] version` will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

Finally, you can contact us by mentioning @dependabot.

</details>

6 years agoUpdate termcolor requirement to 1.0
dependabot[bot] [Wed, 18 Jul 2018 05:36:04 +0000 (05:36 +0000)]
Update termcolor requirement to 1.0

Updates the requirements on [termcolor](https://github.com/BurntSushi/termcolor) to permit the latest version.
- [Release notes](https://github.com/BurntSushi/termcolor/releases)
- [Commits](https://github.com/BurntSushi/termcolor/commits/wincolor-1.0.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
6 years agoAuto merge of #5735 - enizor:doc-profile-debug, r=alexcrichton
bors [Tue, 17 Jul 2018 17:26:30 +0000 (17:26 +0000)]
Auto merge of #5735 - enizor:doc-profile-debug, r=alexcrichton

Doc: manifest profile.X.debug can be either an u32 or a bool

See #5734

6 years agoDoc: manifest profile.X.debug can be either an u32 or a bool
Rémi Garde [Tue, 17 Jul 2018 17:02:50 +0000 (19:02 +0200)]
Doc: manifest profile.X.debug can be either an u32 or a bool

Fixes #5734

6 years agoAuto merge of #5723 - alexcrichton:cargo-fix, r=ehuss
bors [Tue, 17 Jul 2018 16:28:32 +0000 (16:28 +0000)]
Auto merge of #5723 - alexcrichton:cargo-fix, r=ehuss

Import `cargo fix` directly in to Cargo

This commit imports the `cargo fix` subcommand in rust-lang-nursery/rustfix
directly into Cargo as a subcommand. This should allow us to ease our
distribution story of `cargo fix` as we prepare for the upcoming 2018 edition
release.

It's been attempted here to make the code as idiomatic as possible for Cargo's
own codebase. Additionally all tests from cargo-fix were imported into Cargo's
test suite as well. After this lands and is published in nightly the `cargo-fix`
command in rust-lang-nursery/rustfix will likely be removed.

cc rust-lang/rust#52272

6 years agoImport `cargo fix` directly in to Cargo
Alex Crichton [Sat, 14 Jul 2018 01:49:26 +0000 (18:49 -0700)]
Import `cargo fix` directly in to Cargo

This commit imports the `cargo fix` subcommand in rust-lang-nursery/rustfix
directly into Cargo as a subcommand. This should allow us to ease our
distribution story of `cargo fix` as we prepare for the upcoming 2018 edition
release.

It's been attempted here to make the code as idiomatic as possible for Cargo's
own codebase. Additionally all tests from cargo-fix were imported into Cargo's
test suite as well. After this lands and is published in nightly the `cargo-fix`
command in rust-lang-nursery/rustfix will likely be removed.

cc rust-lang/rust#52272

6 years agoAuto merge of #5732 - Eh2406:sort_unstable, r=alexcrichton`,
bors [Mon, 16 Jul 2018 21:45:15 +0000 (21:45 +0000)]
Auto merge of #5732 - Eh2406:sort_unstable, r=alexcrichton`,

most sorts can be unstable

Inspired by [this](https://github.com/rust-lang/cargo/blob/94f7058a483b05ad742da5efb66dd1c2d4b8619c/src/bin/cargo/main.rs#L112-L122) witch was improved in #5691, I did a quick review of `sort`s in the code. Most can be unstable, some can use a `_key` form, and none had unnecessary allocation.

6 years agomost sorts can be unstable
Eh2406 [Mon, 16 Jul 2018 20:23:48 +0000 (16:23 -0400)]
most sorts can be unstable

6 years agoAuto merge of #5710 - RalfJung:default-run, r=alexcrichton
bors [Mon, 16 Jul 2018 20:47:38 +0000 (20:47 +0000)]
Auto merge of #5710 - RalfJung:default-run, r=alexcrichton

implement default-run option to set default binary for cargo run

The implementation is not pretty but as good as I could make it. The fact that all this logic in `cargo_run` is for diagnosis only and essentially just re-implements the filtering done elsewhere really threw me off.

Fixes #2200

6 years agodocument new feature
Ralf Jung [Mon, 16 Jul 2018 19:46:42 +0000 (21:46 +0200)]
document new feature

6 years agofix code nits
Ralf Jung [Mon, 16 Jul 2018 17:45:11 +0000 (19:45 +0200)]
fix code nits

6 years agoorder of lits of binaries is not stable
Ralf Jung [Mon, 16 Jul 2018 09:31:14 +0000 (11:31 +0200)]
order of lits of binaries is not stable

6 years agofeature-gate default-run
Ralf Jung [Mon, 16 Jul 2018 09:28:32 +0000 (11:28 +0200)]
feature-gate default-run

6 years agoimplement default-run option to set default binary for cargo run
Ralf Jung [Wed, 11 Jul 2018 15:25:41 +0000 (17:25 +0200)]
implement default-run option to set default binary for cargo run

6 years agoAuto merge of #5691 - Eh2406:hyphen-underscore, r=alexcrichton
bors [Mon, 16 Jul 2018 19:35:38 +0000 (19:35 +0000)]
Auto merge of #5691 - Eh2406:hyphen-underscore, r=alexcrichton

Make index lookup robust to _ vs -, but don't let the user get it wrong.

This does a brute force search thru combinations of hyphen and underscores to allow queries of crates to pass the wrong one.

This is a small first step of fixing #2775

Where is best to add test?

6 years agoonly suggest lev_distance < 4
Eh2406 [Mon, 16 Jul 2018 19:28:53 +0000 (15:28 -0400)]
only suggest lev_distance < 4

6 years agoAuto merge of #5543 - roblabla:doc-private-items, r=alexcrichton
bors [Mon, 16 Jul 2018 00:26:07 +0000 (00:26 +0000)]
Auto merge of #5543 - roblabla:doc-private-items, r=alexcrichton

Add document-private-items flag to cargo doc

Add a `--document-private-items` flag to `cargo doc`, that mimics the equivalent `cargo rustdoc -- --document-private-items`. This works by relaying the flag to the underlying rustdoc call.

6 years agoVerify that private items were actually documented
roblabla [Sun, 15 Jul 2018 18:22:22 +0000 (20:22 +0200)]
Verify that private items were actually documented

6 years agoAdd a test for document-private-items
roblabla [Sun, 15 Jul 2018 18:10:01 +0000 (20:10 +0200)]
Add a test for document-private-items

6 years agoAuto merge of #5726 - ehuss:warn-virtual-keys, r=alexcrichton
bors [Sun, 15 Jul 2018 17:20:14 +0000 (17:20 +0000)]
Auto merge of #5726 - ehuss:warn-virtual-keys, r=alexcrichton

Warn about unused virtual manifest keys.

Fixes #4243

6 years agoAuto merge of #5727 - Eh2406:todos, r=alexcrichton
bors [Sun, 15 Jul 2018 04:08:43 +0000 (04:08 +0000)]
Auto merge of #5727 - Eh2406:todos, r=alexcrichton

fix some Todo's

Just grep for todo and fix the simple ones.

6 years ago`recv_timeout` was stable in 1.12
Eh2406 [Sun, 15 Jul 2018 02:50:00 +0000 (22:50 -0400)]
`recv_timeout` was stable in 1.12

6 years agoremove unused Serialize
Eh2406 [Sun, 15 Jul 2018 02:42:38 +0000 (22:42 -0400)]
remove unused Serialize

6 years agoremove unused Deserialize
Eh2406 [Sun, 15 Jul 2018 02:41:06 +0000 (22:41 -0400)]
remove unused Deserialize

6 years agoremove incorrect todo
Eh2406 [Sun, 15 Jul 2018 02:35:04 +0000 (22:35 -0400)]
remove incorrect todo

I tried repeatedly to remove the Rc with nll on.
`query` works, but it can not be called repeatedly.

6 years agoWarn about unused virtual manifest keys.
Eric Huss [Sat, 14 Jul 2018 16:20:15 +0000 (09:20 -0700)]
Warn about unused virtual manifest keys.

Fixes #4243

6 years agooops...
Eh2406 [Fri, 13 Jul 2018 22:05:24 +0000 (18:05 -0400)]
oops...

6 years agoAuto merge of #5715 - euclio:third-party-help, r=alexcrichton
bors [Fri, 13 Jul 2018 22:02:09 +0000 (22:02 +0000)]
Auto merge of #5715 - euclio:third-party-help, r=alexcrichton

help: display external subcommand help

When invoking `cargo help <subcommand>`, if the subcommand isn't found, but it *is* an external subcommand, call that subcommand with `--help`.

A test should probably be written for this, but I'm not sure how best to mock an external subcommand.

6 years agodocument custom subcommand help
Andy Russell [Fri, 13 Jul 2018 21:09:10 +0000 (17:09 -0400)]
document custom subcommand help

6 years agoadd tests
Eh2406 [Fri, 13 Jul 2018 20:39:09 +0000 (16:39 -0400)]
add tests

6 years agomove the Uncanonicalizing loop to a Iterator
Eh2406 [Fri, 13 Jul 2018 20:27:42 +0000 (16:27 -0400)]
move the Uncanonicalizing loop to a Iterator

6 years agoAuto merge of #5711 - alexcrichton:fix-stack-overflow, r=ehuss
bors [Fri, 13 Jul 2018 19:18:22 +0000 (19:18 +0000)]
Auto merge of #5711 - alexcrichton:fix-stack-overflow, r=ehuss

Partially revert dep changes in #5651

Some logic which was tweaked around the dependencies of build script targets was
tweaked slightly in a way that causes cargo to stack overflow by accientally
adding a dependency loop. This commit implements one of the strategies discussed
in #5711 to fix this situation.

The problem here is that when calculating the deps of a build script we need the
build scripts of *other* packages, but the exact profile is somewhat difficult
to guess at the moment we're generating our build script unit. To solve this the
dependencies towards other build scripts' executions is added in a different
pass after all other units have been assembled. At this point we should know for
sure that all build script executions are in the dependency graph, and we just
need to add a few more edges.

Closes #5708

6 years agohelp: display external subcommand help
Andy Russell [Wed, 11 Jul 2018 21:14:41 +0000 (17:14 -0400)]
help: display external subcommand help

6 years agoAuto merge of #5700 - alexcrichton:update-width, r=matklad
bors [Fri, 13 Jul 2018 18:39:46 +0000 (18:39 +0000)]
Auto merge of #5700 - alexcrichton:update-width, r=matklad

Update terminal width each time we print a display

This should help accomodate terminals that are resized while a progress bar is
being displayed. Additionally this shouldn't come with too much of a performance
impact because we're already heavily throttling printing of a progress update!

Closes #4732

6 years agoPartially revert dep changes in #5651
Alex Crichton [Wed, 11 Jul 2018 16:27:08 +0000 (09:27 -0700)]
Partially revert dep changes in #5651

Some logic which was tweaked around the dependencies of build script targets was
tweaked slightly in a way that causes cargo to stack overflow by accientally
adding a dependency loop. This commit implements one of the strategies discussed
in #5711 to fix this situation.

The problem here is that when calculating the deps of a build script we need the
build scripts of *other* packages, but the exact profile is somewhat difficult
to guess at the moment we're generating our build script unit. To solve this the
dependencies towards other build scripts' executions is added in a different
pass after all other units have been assembled. At this point we should know for
sure that all build script executions are in the dependency graph, and we just
need to add a few more edges.

Closes #5708

6 years agoAuto merge of #5712 - alexcrichton:better-debug, r=ehuss
bors [Fri, 13 Jul 2018 17:30:22 +0000 (17:30 +0000)]
Auto merge of #5712 - alexcrichton:better-debug, r=ehuss

Improve Debug display for a few types

Try to cut down on the wordiness here and make these implementations a bit more
usable by default.

6 years agosort suggestions by distance
Eh2406 [Thu, 12 Jul 2018 17:25:42 +0000 (13:25 -0400)]
sort suggestions by distance

6 years agoAuto merge of #5716 - kennytm:unstable-compile-progress, r=alexcrichton
bors [Thu, 12 Jul 2018 15:26:27 +0000 (15:26 +0000)]
Auto merge of #5716 - kennytm:unstable-compile-progress, r=alexcrichton

Reintroduce the compile progress bar as an unstable feature (-Z compile-progress)

This allows us to test the feature on-demand to see if there's any other bugs besides #5695.

Also, fixed the flickering #5697 (this was caused by build script emitting Stdout/Stderr events).

6 years agoCompile progress: Do not update when a build script prints something.
kennytm [Thu, 12 Jul 2018 03:59:35 +0000 (11:59 +0800)]
Compile progress: Do not update when a build script prints something.

Fix #5697. There may still be some little flickering, but should be much
less severe than before.

6 years agoBring back the compile progress bar as an -Z option.
kennytm [Thu, 12 Jul 2018 03:10:00 +0000 (11:10 +0800)]
Bring back the compile progress bar as an -Z option.

6 years agoupdate test to get ci passing
Eh2406 [Wed, 11 Jul 2018 20:55:25 +0000 (16:55 -0400)]
update test to get ci passing

6 years agoAuto merge of #5714 - jeremyBanks:docs-project-to-package, r=alexcrichton
bors [Wed, 11 Jul 2018 18:45:25 +0000 (18:45 +0000)]
Auto merge of #5714 - jeremyBanks:docs-project-to-package, r=alexcrichton

Replace remaining uses of `[project]` in documentation with `[package]`

The `[project]` section is not currently referenced anywhere else in the documentation, so the use here confused me, and I spent a while trying to add it to a `Cargo.toml` that already had a `[package]`.

`[project]` seems to be a deprecated alias for `[package]`, which is documented, so let's swap it out.

6 years agoAuto merge of #5713 - mbrubeck:doc, r=alexcrichton
bors [Wed, 11 Jul 2018 18:24:19 +0000 (18:24 +0000)]
Auto merge of #5713 - mbrubeck:doc, r=alexcrichton

Clarify FAQ about Cargo.lock for libraries

The current wording in the FAQ implies that checking in a Cargo.lock for a library could cause version conflicts in consumers of the library, which is not true.

The text in the FAQ was based on [this comment][1] (emphasis mine):

> If each dependent library checked in a Cargo.lock, **and Cargo used it,** you would instead get multiple, duplicate copies of those dependencies

but it accidentally dropped the "and Cargo used it" requirement, which I think is the more important part.

[1]: https://github.com/rust-lang/cargo/pull/534#issuecomment-54776481

6 years agoReplace remaining uses of `[project]` in documentation with `[package]`
Jeremy Banks [Wed, 11 Jul 2018 17:52:53 +0000 (13:52 -0400)]
Replace remaining uses of `[project]` in documentation with `[package]`

The `[project]` section is not currently referenced anywhere else in the documentation, so the use here confused me. It seems to be a deprecated alias for `[package]`, which is documented, so let's swap it.

6 years agoallow each source to recommend packages that are close to a dependency
Eh2406 [Wed, 11 Jul 2018 16:46:52 +0000 (12:46 -0400)]
allow each source to recommend packages that are close to a dependency

6 years agoClarify FAQ about Cargo.lock for libraries
Matt Brubeck [Wed, 11 Jul 2018 16:35:55 +0000 (09:35 -0700)]
Clarify FAQ about Cargo.lock for libraries

The current wording in the FAQ implies that checking in a Cargo.lock for
a library could cause version conflicts in consumers of the library,
which is not true.

The text in the FAQ was based on [this comment][1] (emphasis mine):

> If each dependent library checked in a Cargo.lock, **and Cargo used
> it,** you would instead get multiple, duplicate copies of those
> dependencies

but it accidentally dropped the "and Cargo used it" requirement, which I
think is the more important part.

[1]: https://github.com/rust-lang/cargo/pull/534#issuecomment-54776481

6 years agoImprove Debug display for a few types
Alex Crichton [Wed, 11 Jul 2018 16:30:23 +0000 (09:30 -0700)]
Improve Debug display for a few types

Try to cut down on the wordiness here and make these implementations a bit more
usable by default.

6 years agoadd test for wrong_case in registry
Eh2406 [Tue, 10 Jul 2018 15:05:44 +0000 (11:05 -0400)]
add test for wrong_case in registry

6 years agoadd test for wrong_case in cargo.toml
Eh2406 [Mon, 9 Jul 2018 22:02:46 +0000 (18:02 -0400)]
add test for wrong_case in cargo.toml

6 years agoUpdate terminal width each time we print a display
Alex Crichton [Mon, 9 Jul 2018 18:50:59 +0000 (11:50 -0700)]
Update terminal width each time we print a display

This should help accomodate terminals that are resized while a progress bar is
being displayed. Additionally this shouldn't come with too much of a performance
impact because we're already heavily throttling printing of a progress update!

Closes #4732

6 years agoAuto merge of #5698 - alexcrichton:no-progress-sad, r=kennytm
bors [Mon, 9 Jul 2018 02:02:18 +0000 (02:02 +0000)]
Auto merge of #5698 - alexcrichton:no-progress-sad, r=kennytm

Disable progress bar for build in Cargo

This is primarily blocked on #5695 which unfortunately doesn't have a great fix
today, so disable it for now while we try to work out a better solution.

Closes #5695
Closes #5697

6 years agostart with the name as given, and cap the number to be switched
Eh2406 [Sat, 7 Jul 2018 16:06:08 +0000 (12:06 -0400)]
start with the name as given, and cap the number to be switched

6 years agocargo +stable fmt
Eh2406 [Sat, 7 Jul 2018 15:44:58 +0000 (11:44 -0400)]
cargo +stable fmt

6 years agomake index lookup robust to _ vs -
Eh2406 [Fri, 6 Jul 2018 16:08:00 +0000 (12:08 -0400)]
make index lookup robust to _ vs -

6 years agoDisable progress bar for build in Cargo
Alex Crichton [Sun, 8 Jul 2018 15:54:30 +0000 (08:54 -0700)]
Disable progress bar for build in Cargo

This is primarily blocked on #5695 which unfortunately doesn't have a great fix
today, so disable it for now while we try to work out a better solution.

Closes #5695
Closes #5697

6 years agoAuto merge of #5694 - Eh2406:more_InternedString, r=alexcrichton
bors [Sun, 8 Jul 2018 15:24:09 +0000 (15:24 +0000)]
Auto merge of #5694 - Eh2406:more_InternedString, r=alexcrichton

More interned string

This is a series of attempts to remove temporary strings. There is no evidence that this will help with anything, but it just seems cleaner.

Probably easier to read one commit at a time.

6 years agocargo fmt and impl Borrow<str> for InternedString
Eh2406 [Sun, 8 Jul 2018 13:56:56 +0000 (09:56 -0400)]
cargo fmt and impl Borrow<str> for InternedString

6 years agoadd the Cows back in and add a test to keep them
Eh2406 [Sat, 7 Jul 2018 15:12:22 +0000 (11:12 -0400)]
add the Cows back in and add a test to keep them

6 years agoone more small change
Eh2406 [Sat, 7 Jul 2018 15:10:33 +0000 (11:10 -0400)]
one more small change

6 years agooops...
Eh2406 [Fri, 6 Jul 2018 23:59:20 +0000 (19:59 -0400)]
oops...

6 years agoreduce 2 more allocation of temp strings
Eh2406 [Fri, 6 Jul 2018 21:57:46 +0000 (17:57 -0400)]
reduce 2 more allocation of temp strings

6 years agoreduce InternedString::new from the hot loop
Eh2406 [Fri, 6 Jul 2018 21:52:16 +0000 (17:52 -0400)]
reduce InternedString::new from the hot loop

6 years agoreduce InternedString::new
Eh2406 [Fri, 6 Jul 2018 21:42:27 +0000 (17:42 -0400)]
reduce InternedString::new

6 years agoAuto merge of #5693 - rust-lang:dependabot/cargo/lazycell-1.0, r=alexcrichton
bors [Fri, 6 Jul 2018 20:20:05 +0000 (20:20 +0000)]
Auto merge of #5693 - rust-lang:dependabot/cargo/lazycell-1.0, r=alexcrichton

Update lazycell requirement to 1.0

Updates the requirements on [lazycell](https://github.com/indiv0/lazycell) to permit the latest version.
<details>
<summary>Release notes</summary>

*Sourced from [lazycell's releases](https://github.com/indiv0/lazycell/releases).*

> ## v1.0.0
> <a name="v1.0.0"></a>
> ## v1.0.0 (2018-06-06)
>
>
> #### Features
>
> *   Add #![no_std] ([e59f6b55](https://github.com/indiv0/lazycell/commit/e59f6b5531e310d3df26b0eb40b1431937f38096))
</details>
<details>
<summary>Changelog</summary>

*Sourced from [lazycell's changelog](https://github.com/indiv0/lazycell/blob/master/CHANGELOG.md).*

> ## v1.0.0 (2018-06-06)
>
>
> #### Features
>
> *   Add #![no_std] ([e59f6b55](https://github.com/indiv0/lazycell/commit/e59f6b5531e310d3df26b0eb40b1431937f38096))
>
>
>
> <a name="0.6.0"></a>
> ## 0.6.0 (2017-11-25)
>
>
> #### Bug Fixes
>
> *   fix soundness hole in borrow_with ([d1f46bef](https://github.com/indiv0/lazycell/commit/d1f46bef9d1397570aa9c3e87e18e0d16e6d1585))
>
> #### Features
>
> *   add Default derives ([71bc5088](https://github.com/indiv0/lazycell/commit/71bc50880cd8e20002038197c9b890f5b76ad096))
> *   add LazyCell::try_borrow_with ([bffa4028](https://github.com/indiv0/lazycell/commit/bffa402896670b5c78a9ec050d82a58ee98de6fb))
> *   add LazyCell::borrow_mut method ([fd419dea](https://github.com/indiv0/lazycell/commit/fd419dea965ff1ad3853f26f37e8d107c6ca096c))
>
> #### Breaking Changes
>
> *   add `T: Send` for `AtomicLazyCell` `Sync` impl ([668bb2fa](https://github.com/indiv0/lazycell/commit/668bb2fa974fd6707c4c7edad292c76a9017d74d), closes [#67](https://github-redirect.dependabot.com/indiv0/lazycell/issues/67))
>
> #### Improvements
>
> *   add `T: Send` for `AtomicLazyCell` `Sync` impl ([668bb2fa](https://github.com/indiv0/lazycell/commit/668bb2fa974fd6707c4c7edad292c76a9017d74d), closes [#67](https://github-redirect.dependabot.com/indiv0/lazycell/issues/67))
>
>
>
> <a name="v0.5.1"></a>
> ## v0.5.1 (2017-03-24)
>
>
> #### Documentation
>
> *   fix missing backticks ([44bafaaf](https://github.com/indiv0/lazycell/commit/44bafaaf93a91641261f58ee38adadcd4af6458e))
>
> #### Improvements
>
> *   derive `Debug` impls ([9da0a5a2](https://github.com/indiv0/lazycell/commit/9da0a5a2ffac1fef03ef02851c2c89d26d67d225))
>
> #### Features
>
> *   Add get method for Copy types ([dc8f8209](https://github.com/indiv0/lazycell/commit/dc8f8209888b6eba6d18717eba6a22614629b997))
>
>
></table> ... (truncated)
</details>
<details>
<summary>Commits</summary>

- See full diff in [compare view](https://github.com/indiv0/lazycell/commits/v1.0.0)
</details>
<br />

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

---

**Note:** This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit.

You can always request more updates by clicking `Bump now` in your [Dependabot dashboard](https://app.dependabot.com).

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot ignore this [patch|minor|major] version` will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

Finally, you can contact us by mentioning @dependabot.

</details>

6 years agoreduce more allocation of temp strings
Eh2406 [Fri, 6 Jul 2018 20:14:11 +0000 (16:14 -0400)]
reduce more allocation of temp strings

6 years agoUpdate lazycell requirement to 1.0
dependabot[bot] [Fri, 6 Jul 2018 20:11:14 +0000 (20:11 +0000)]
Update lazycell requirement to 1.0

Updates the requirements on [lazycell](https://github.com/indiv0/lazycell) to permit the latest version.
- [Release notes](https://github.com/indiv0/lazycell/releases)
- [Changelog](https://github.com/indiv0/lazycell/blob/master/CHANGELOG.md)
- [Commits](https://github.com/indiv0/lazycell/commits/v1.0.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
6 years agoreduce allocation of temp strings
Eh2406 [Fri, 6 Jul 2018 19:32:05 +0000 (15:32 -0400)]
reduce allocation of temp strings

6 years agoAuto merge of #5680 - mikeyhew:fix-shell-quoting, r=alexcrichton
bors [Fri, 6 Jul 2018 14:21:24 +0000 (14:21 +0000)]
Auto merge of #5680 - mikeyhew:fix-shell-quoting, r=alexcrichton

Fix the shell_quoting test

r? @alexcrichton

add-on to #5666
- Added `mod shell_quoting;` to testsuite/main.rs, so it actually runs
- fixed bugs in the test

6 years agoadd `MSYSTEM=1` to shell_quoting test
Michael Hewson [Fri, 6 Jul 2018 13:25:55 +0000 (09:25 -0400)]
add `MSYSTEM=1` to shell_quoting test
- this should make it use unix escaping on windows

6 years agoAuto merge of #5689 - ehuss:doc-opt-level, r=alexcrichton
bors [Fri, 6 Jul 2018 00:13:41 +0000 (00:13 +0000)]
Auto merge of #5689 - ehuss:doc-opt-level, r=alexcrichton

Document opt-level 's' and 'z' stabilized in 1.28.

6 years agoDocument opt-level 's' and 'z' stabilized in 1.28.
Eric Huss [Thu, 5 Jul 2018 23:37:18 +0000 (16:37 -0700)]
Document opt-level 's' and 'z' stabilized in 1.28.

6 years agoAuto merge of #5688 - nrc:rls-features, r=alexcrichton
bors [Thu, 5 Jul 2018 23:16:56 +0000 (23:16 +0000)]
Auto merge of #5688 - nrc:rls-features, r=alexcrichton

Add missing winapi features

To support RLS in Rust repo, features from https://github.com/rust-lang/rust/pull/51677#issuecomment-402781751

r? @alexcrichton

6 years agoAdd missing winapi features
Nick Cameron [Thu, 5 Jul 2018 23:05:12 +0000 (11:05 +1200)]
Add missing winapi features

To support RLS in Rust repo, features from https://github.com/rust-lang/rust/pull/51677#issuecomment-402781751

6 years agoAuto merge of #5571 - pickfire:patch-1, r=alexcrichton
bors [Thu, 5 Jul 2018 20:45:09 +0000 (20:45 +0000)]
Auto merge of #5571 - pickfire:patch-1, r=alexcrichton

Remove explicit --bin for getting started doc

6 years agoAuto merge of #5651 - ehuss:panic-rustdoc, r=matklad
bors [Thu, 5 Jul 2018 20:06:19 +0000 (20:06 +0000)]
Auto merge of #5651 - ehuss:panic-rustdoc, r=matklad

Fix doctests linking too many libs.

Fixes #5650.  cc #5435

As part of my recent work on profiles, I introduced some situations where a
library can be compiled multiple times with different settings.  Doctests were
greedily grabbing all dependencies for a package, regardless of which target
is was for.  This can cause doctests to fail if it links multiple copies of
the same library.

One way to trigger this is `cargo test --release` if you have dependencies, a
build script, and `panic="abort"`.  There are other (more obscure) ways to
trigger it with profile overrides.