]> git.proxmox.com Git - cargo.git/log
cargo.git
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 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.

6 years agoAuto merge of #5685 - alexcrichton:fix-cargo-install-target-dir, r=matklad
bors [Thu, 5 Jul 2018 19:07:59 +0000 (19:07 +0000)]
Auto merge of #5685 - alexcrichton:fix-cargo-install-target-dir, r=matklad

Fix `cargo install` using a workspace target dir

Closes #5662

6 years agoFix `cargo install` using a workspace target dir
Alex Crichton [Thu, 5 Jul 2018 19:05:50 +0000 (12:05 -0700)]
Fix `cargo install` using a workspace target dir

Closes #5662

6 years agoget the new test working
Michael Hewson [Wed, 4 Jul 2018 15:04:10 +0000 (11:04 -0400)]
get the new test working

- Added `mod shell_quoting` to testsuite/main.rs
- fixed up errors in the test, now that the test suite knows about it

6 years agoAuto merge of #5666 - mikeyhew:fix-shell-quoting, r=alexcrichton
bors [Tue, 3 Jul 2018 22:18:05 +0000 (22:18 +0000)]
Auto merge of #5666 - mikeyhew:fix-shell-quoting, r=alexcrichton

[needs test] always shell-escape command arguments after failure

cc @joshtriplett
fixes #5665

Removes the `debug_string` method, in favour of always using the
`fmt::Display` impl. `debug_string` didn’t escape the command
arguments, so that’s why we ended up with unescaped arguments after
compilation failed.

Don't merge this yet, because I still want to add a regression test. I don't think there's any tests on shell quoting yet, so I'll probably add a new test file including tests for the "Running <command>" output too. I still have to figure out how to write tests, and don't have the energy to do that tonight 😴

I just wanted to say, by the way, I was pleasantly surprised with how clean the code is in this repo, especially compared to rustc. It made it really easy to find the relevant part of the code and implement these changes.

6 years agoadded a test that `feature=foo` will be quoted
Michael Hewson [Tue, 3 Jul 2018 18:19:48 +0000 (14:19 -0400)]
added a test that `feature=foo` will be quoted

The doesn’t doesn’t seem to run when I run `cargo test` though

6 years agoAuto merge of #5673 - matklad:no-internal, r=alexcrichton
bors [Sun, 1 Jul 2018 16:59:17 +0000 (16:59 +0000)]
Auto merge of #5673 - matklad:no-internal, r=alexcrichton

Show "duplicates in lockfile" without --verbose

It is possible to get duplicate pacakges after a merge, so it make
sense to print a little bit more details by defaults than just
"failed to parse a lockfile".

6 years agoShow lockfile parsing errors without --verbose
Aleksey Kladov [Sun, 1 Jul 2018 07:13:15 +0000 (10:13 +0300)]
Show lockfile parsing errors without --verbose

It is possible to get invalid lockfile after an automatic merge, so it
make sense to print a little bit more details by defaults than just
"failed to parse a lockfile".

6 years agoAuto merge of #5672 - ehuss:cbfct-take3, r=alexcrichton
bors [Sat, 30 Jun 2018 18:39:32 +0000 (18:39 +0000)]
Auto merge of #5672 - ehuss:cbfct-take3, r=alexcrichton

cbfct: Take 3

Third attempt to fix race condition in changing_bin_features_caches_targets.
Previous fix for linux re-broke Windows
(https://ci.appveyor.com/project/rust-lang-libs/cargo/build/1.0.5004)

6 years agocbfct: Take 3
Eric Huss [Sat, 30 Jun 2018 17:59:38 +0000 (10:59 -0700)]
cbfct: Take 3

Third attempt to fix race condition in changing_bin_features_caches_targets.
Previous fix for linux re-broke Windows
(https://ci.appveyor.com/project/rust-lang-libs/cargo/build/1.0.5004)

6 years agoAuto merge of #5652 - Eh2406:masquerade_as_nightly_cargo, r=alexcrichton
bors [Fri, 29 Jun 2018 20:29:18 +0000 (20:29 +0000)]
Auto merge of #5652 - Eh2406:masquerade_as_nightly_cargo, r=alexcrichton

skip test if not nightly; fix for #5648

closes #5648
The alternative was to use `set_var` to emulate `masquerade_as_nightly_cargo` but we worried that it would not get unset correctly. Although I think each test is its own process, so it should work.

6 years agoAuto merge of #5669 - alexcrichton:less-build, r=matklad
bors [Fri, 29 Jun 2018 19:24:00 +0000 (19:24 +0000)]
Auto merge of #5669 - alexcrichton:less-build, r=matklad

Fix avoiding a rebuild when moving around a workspace

There's a case where Cargo will recompile a project even if the fingerprint
looks like it's fresh, when some output files are missing. This was intended to
cover the case where an output file was deleted manually or otherwise messed
with. The check here was a bit too eager, however. It checked not only the
actual output destination of the compiler but *also* the location that we hard
link the output file up to.

Due to recent changes in #5460 we don't always create the hard links for path
dependencies in the top-level dir, and this meant that if the library were
compiled and then tested later on the test may recompile the original library by
accident.

The fix in this commit is to cease looking for the hardlink if it exists or not.
This way we only check for the presence of the output file itself and only
recompile if that file is missing. The reason for this is that we
unconditionally relink files into place whether it's fresh or not, so we'll
always recreate the hard link anyway if it's missing.

cc rust-lang/rust#51717

6 years agodefault tests to stable and override where needed
Eh2406 [Fri, 29 Jun 2018 19:21:05 +0000 (15:21 -0400)]
default tests to stable and override where needed

6 years agoFix avoiding a rebuild when moving around a workspace
Alex Crichton [Fri, 29 Jun 2018 19:17:41 +0000 (12:17 -0700)]
Fix avoiding a rebuild when moving around a workspace

There's a case where Cargo will recompile a project even if the fingerprint
looks like it's fresh, when some output files are missing. This was intended to
cover the case where an output file was deleted manually or otherwise messed
with. The check here was a bit too eager, however. It checked not only the
actual output destination of the compiler but *also* the location that we hard
link the output file up to.

Due to recent changes in #5460 we don't always create the hard links for path
dependencies in the top-level dir, and this meant that if the library were
compiled and then tested later on the test may recompile the original library by
accident.

The fix in this commit is to cease looking for the hardlink if it exists or not.
This way we only check for the presence of the output file itself and only
recompile if that file is missing. The reason for this is that we
unconditionally relink files into place whether it's fresh or not, so we'll
always recreate the hard link anyway if it's missing.

cc rust-lang/rust#51717

6 years agoAuto merge of #5620 - kennytm:compile-progress, r=matklad
bors [Fri, 29 Jun 2018 17:48:34 +0000 (17:48 +0000)]
Auto merge of #5620 - kennytm:compile-progress, r=matklad

Displays a one line progress of what crates are currently built.

cc #2536, #3448.

The change is based on #3451, but uses the progress bar introduced in #4646 instead. The percentage is simply the number of crates processed ÷ total crates count, which is inaccurate but better than nothing.

Output looks like:
[![asciicast](https://asciinema.org/a/YTiBAz4K4vfidNTAnehtyH46l.png)](https://asciinema.org/a/YTiBAz4K4vfidNTAnehtyH46l)

6 years agoMore fixes.
kennytm [Fri, 29 Jun 2018 17:39:35 +0000 (01:39 +0800)]
More fixes.

6 years agoAuto merge of #5614 - infinity0:master, r=alexcrichton
bors [Fri, 29 Jun 2018 16:04:51 +0000 (16:04 +0000)]
Auto merge of #5614 - infinity0:master, r=alexcrichton

Support cross-compile install

Amazingly this Just Works, tested cross-compiling aho-corasick from amd64 to armhf on Debian.

6 years agoAlways use the Display impl for ProcessBuilder output
Michael Hewson [Fri, 29 Jun 2018 04:46:12 +0000 (00:46 -0400)]
Always use the Display impl for ProcessBuilder output

fixes #5665

remove the `debug_string` method, in favour of always using the
`fat::Display` impl. `debug_string` didn’t escape the command
arguments, so that’s why we ended up with unescaped arguments after
compilation failed

6 years agoSupport cross-compile install
Ximin Luo [Fri, 29 Jun 2018 01:57:24 +0000 (18:57 -0700)]
Support cross-compile install

6 years agoRevert "`cargo install` will ignore the target triple specified in a project directory"
Ximin Luo [Fri, 29 Jun 2018 01:34:12 +0000 (18:34 -0700)]
Revert "`cargo install` will ignore the target triple specified in a project directory"

This reverts commit 1bad99180aa71f9e0db1dd1629e53beb58ca65b3.

6 years agoAddressed comments.
kennytm [Thu, 28 Jun 2018 21:15:59 +0000 (05:15 +0800)]
Addressed comments.

6 years agoDisplays a one line progress of what crates are currently built.
kennytm [Fri, 8 Jun 2018 20:25:13 +0000 (04:25 +0800)]
Displays a one line progress of what crates are currently built.

cc #2536, #3448.