8692 Commits

Author SHA1 Message Date
Igor Makarov
e8a8f76432 suppress clippy lint block_in_if_condition_stmt in the testsuite because fixing it upsets rustfmt 2019-11-12 10:56:07 +02:00
Igor Makarov
60f88a4b7a implement clippy suggestion not to use assert_eq on () 2019-11-12 10:55:11 +02:00
Igor Makarov
6d21f9e08c silence several clippy lints in tests 2019-11-12 10:54:59 +02:00
Igor Makarov
b590183d87 suppress clippy lint needless_doctest_main 2019-11-12 10:49:04 +02:00
Igor Makarov
b3fe6b7d27 implement clippy suggestion to remove redundant to_string 2019-11-12 10:21:21 +02:00
Igor Makarov
37ec84d09a implement clippy suggestion to remove needless return 2019-11-12 10:21:21 +02:00
Igor Makarov
e1501f17ab refactor method to avoid calling unwrap() explicitly 2019-11-12 10:21:21 +02:00
Igor Makarov
b7e17785a8 implement clippy suggestion to use or_else instead of or to avoid unintended side effects 2019-11-12 10:20:14 +02:00
Igor Makarov
b31bf0444a implement clippy suggestion to remove needless return 2019-11-12 10:20:14 +02:00
Igor Makarov
230d353367 implement clippy suggestion to use if as an expression 2019-11-12 10:20:14 +02:00
Igor Makarov
018e8dea6e implement clippy suggestion to use or_insert_with 2019-11-12 10:20:14 +02:00
Igor Makarov
b98673fc42 remove suppression of clippy lint too_many_arguments 2019-11-12 10:20:14 +02:00
Igor Makarov
4a1207caaa add clippy to the pipelines 2019-11-12 10:20:14 +02:00
bors
8280633db6 Auto merge of #7580 - alexcrichton:less-unwrap, r=ehuss
Don't panic when parsing `/proc/stat`

Use more robust error handling than `.unwrap()`!

Closes #7577
2019-11-11 23:17:05 +00:00
bors
1292915a99 Auto merge of #7575 - orium:fix-unused-warnings, r=alexcrichton
Fix unused configuration key warning for a few keys under `build`.

Recently cargo started to warn about configuration keys that he doesn't know about.  However, there are a few keys under `build` that were used in a dynamic way (`rustc`, `rustdoc`, and `rustc_wrapper`) by `Config::maybe_get_tool()`.

Since these keys are not known to exist when `Config` is deserialized, cargo was emitting unused warnings.

This commit makes those config keys explicit.  Note that by doing so there is a small breaking change: before it was possible to have `build.rustc_wrapper` in the configuration file (even though the documented key uses kebak-case), and now that key will be ignored.  (Good thing we have warnings for unrecognized keys!)
2019-11-11 22:42:50 +00:00
bors
f6122844f8 Auto merge of #7576 - orium:add-back-support-for-browser-envvar, r=alexcrichton
Add back support for `BROWSER` envvar in `cargo doc --open`.

Fixes #6064.
Fixes #5965.
2019-11-11 22:24:12 +00:00
Diogo Sousa
23a2efe7fb Add back support for BROWSER envvar in cargo doc --open.
Fixes #6064.
Fixes #5965.
2019-11-11 19:32:47 +00:00
bors
dd3466881e Auto merge of #7570 - twe4ked:already-existing-git-ignore-comment, r=alexcrichton
Only include "already existing ..." comment in gitignore on conflict

I found the comment a bit confusing when I've used `cargo init` when I haven't had any conflicts. I thought it was meaning that my existing entries would be all commented out so I thought there was a bug of some kind.

This PR changes the comment to only be included when there are conflicting entries in the existing file.
2019-11-11 18:37:02 +00:00
Alex Crichton
540fb9dd83 Don't panic when parsing /proc/stat
Use more robust error handling than `.unwrap()`!

Closes #7577
2019-11-11 09:41:04 -08:00
bors
cb50a1991a Auto merge of #7578 - igor-makarov:vscode-ignore, r=Eh2406
Add VS Code user dir to .gitignore

This is similar to `.idea`.
2019-11-11 15:57:33 +00:00
bors
127d2b4dc2 Auto merge of #7486 - zachlute:suggest-alias2, r=alexcrichton
Added aliases to subcommand typo suggestions.

Fixes #7278.

Also adds tests for alias suggestions.
2019-11-11 15:29:32 +00:00
bors
213001676b Auto merge of #7573 - mgeisler:patch-1, r=alexcrichton
Use multiple requirement syntax consistently

It was never super clear to me how I would specify multiple requirements since the page uses a "meta syntax" in most of the examples and only mention the real syntax in a single sentence. Now all version requirements on the page follow the same syntax.
2019-11-11 14:56:06 +00:00
Igor Makarov
5709d5ebc8 add VS Code user dir to .gitignore 2019-11-11 10:35:40 +02:00
Diogo Sousa
e509851813 Fix unused configuration key warning for a few keys under build.
Recently cargo started to warn about configuration keys that he doesn't know
about.  However, there are a few keys under `build` that were used in a
dynamic way (`rustc`, `rustdoc`, and `rustc_wrapper`) by
`Config::maybe_get_tool()`.

Since these keys are not known to exist when `Config` is deserialized, cargo
was emitting unused warnings.

This commit makes those config keys explicit.  Note that by doing so there is a
small breaking change: before it was possible to have `build.rustc_wrapper` in
the configuration file (even though the documented key uses kebak-case), and
now that key will be ignored.  (Good thing we have warnings for unrecognized
keys!)
2019-11-10 15:18:16 +00:00
Zach Lute
0f157f52b0 Replaced config.get_table() with a more succinct config.get<BTreeMap>() when listing aliases. 2019-11-09 07:54:58 -08:00
Martin Geisler
37ec674be9
Use multiple requirement syntax consistently
It was never super clear to me how I would specify multiple requirements since the page uses a "meta syntax" in most of the examples and only mention the real syntax in a single sentence. Now all version requirements on the page follow the same syntax.
2019-11-09 08:49:41 +01:00
Odin Dutton
c42f2eeb0e Improve gitignore comment wording 2019-11-08 10:00:57 +11:00
Odin Dutton
a6db5b0797 Fix comment 2019-11-08 10:00:29 +11:00
Odin Dutton
3e8cdd7ce0 Only include "already existing ..." comment in gitignore on conflict
This comment was previously confusing when there were no existing items
that conflict.
2019-11-08 09:59:33 +11:00
bors
0c0f9aeccf Auto merge of #7568 - ehuss:version-bump, r=alexcrichton
Update verison to 0.42

- Update changelog
- Update some tests
- Fix a nightly warning
- Remove `--crate-type` check for rustdoc.
2019-11-07 19:33:43 +00:00
Eric Huss
1df81ee07e Bump to 0.42.0, Update changelog 2019-11-07 11:19:48 -08:00
Eric Huss
a8f645a9ca Remove some needless parentheses now reported on nightly. 2019-11-07 11:19:07 -08:00
Eric Huss
4dbc63ef1e Update some tests that now support stable. 2019-11-07 11:16:18 -08:00
Eric Huss
8e9c86c6f2 Remove --crate-type test for rustdoc now that it is stable. 2019-11-07 11:14:49 -08:00
bors
22b08c45b8 Auto merge of #7565 - ehuss:expand-build-script-docs, r=alexcrichton
Expand documentation on build scripts.

This restructures and adds some more documentation for writing build scripts. An overview:

- Move examples to a separate chapter.
    - Add some links to common build dependencies.
    - Rewrote the example of linking to system libraries.
    - Rewrote some of the `links` and `-sys` examples.
    - Added a "conditional compilation" example.
- De-emphasize setting `build = "build.rs"`.
- Explain how build scripts run.
- Give each `cargo:` instruction a separate section with more detail.
- More detail on how `rerun-if` stuff works. Also, try to emphasize best practices, especially in examples.
- Try to clarify `links` and go into more detail.
- Document the jobserver.
- Expand on environment variables.
    - Document dylib search path behavior.

I have explicitly skipped trying to document rpath issues, as it seems to be a mess, and I can't really sort it out.

I'd be happy to have any feedback for things to add or change.

Closes #1251
Closes #2236
Closes #2888
Closes #3304
Closes #3968
Closes #5499
Closes #7338
2019-11-07 19:01:23 +00:00
Eric Huss
dd546ea47e Add some warnings/disclaimers about build-dependencies.
Also add `autocfg` to the list.
2019-11-07 09:02:49 -08:00
bors
5b204445ce Auto merge of #7566 - rust-lang:dependabot/cargo/crossbeam-utils-0.7, r=alexcrichton
Update crossbeam-utils requirement from 0.6 to 0.7

Updates the requirements on [crossbeam-utils](https://github.com/crossbeam-rs/crossbeam) to permit the latest version.
<details>
<summary>Changelog</summary>

*Sourced from [crossbeam-utils's changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md).*

> # Version 0.7.0
>
> - Remove `ArcCell`, `MsQueue`, and `TreiberStack`.
> - Change the interface of `ShardedLock` to match `RwLock`.
> - Add `SegQueue::len()`.
> - Rename `SegQueue::try_pop()` to `SegQueue::pop()`.
> - Change the return type of `SegQueue::pop()` to `Result`.
> - Introduce `ArrayQueue`.
> - Update dependencies.
>
> # Version 0.6.0
>
> - Update dependencies.
>
> # Version 0.5.0
>
> - Update `crossbeam-channel` to 0.3.
> - Update `crossbeam-utils` to 0.6.
> - Add `AtomicCell`, `SharedLock`, and `WaitGroup`.
>
> # Version 0.4.1
>
> - Fix a double-free bug in `MsQueue` and `SegQueue`.
>
> # Version 0.4
>
> - Switch to the new implementation of epoch-based reclamation in
>   [`crossbeam-epoch`](https://github.com/crossbeam-rs/crossbeam-epoch), fixing numerous bugs in the
>   old implementation.  Its API is changed in a backward-incompatible way.
> - Switch to the new implementation of `CachePadded` and scoped thread in
>   [`crossbeam-utils`](https://github.com/crossbeam-rs/crossbeam-utils).  The scoped thread API is
>   changed in a backward-incompatible way.
> - Switch to the new implementation of Chase-Lev deque in
>   [`crossbeam-deque`](https://github.com/crossbeam-rs/crossbeam-deque).  Its API is changed in a
>   backward-incompatible way.
> - Export channel implemented in
>   [`crossbeam-channel`](https://github.com/crossbeam-rs/crossbeam-channel).
> - Remove `AtomicOption`.
> - Implement `Default` and `From` traits.
>
> # Version 0.3
>
> - Introduced `ScopedThreadBuilder` with the ability to name threads and set stack size
> - `Worker` methods in the Chase-Lev deque don't require mutable access anymore
> - Fixed a bug when unblocking `pop()` in `MsQueue`
> - Implemented `Drop` for `MsQueue`, `SegQueue`, and `TreiberStack`
> - Implemented `Default` for `TreiberStack`
> - Added `is_empty` to `SegQueue`
> - Renamed `mem::epoch` to `epoch`
> - Other bug fixes
></tr></table> ... (truncated)
</details>
<details>
<summary>Commits</summary>

- [`28ad2b7`](28ad2b7e01) Update versions in readmes
- [`c98fea1`](c98fea12e6) Merge [#444](https://github-redirect.dependabot.com/crossbeam-rs/crossbeam/issues/444)
- [`d953f49`](d953f49ecc) Add compatibility section to readme
- [`c76f145`](c76f145182) Prepare for the next release
- [`99762ee`](99762ee633) Merge [#442](https://github-redirect.dependabot.com/crossbeam-rs/crossbeam/issues/442)
- [`ebb6b5f`](ebb6b5fe6d) Do not perform superfluous bounds checks on drop
- [`d2ab7a5`](d2ab7a5c43) Update LICENSE-APACHE
- [`f54db88`](f54db88d1a) Merge [#437](https://github-redirect.dependabot.com/crossbeam-rs/crossbeam/issues/437)
- [`caa52c4`](caa52c4e84) Merge [#436](https://github-redirect.dependabot.com/crossbeam-rs/crossbeam/issues/436)
- [`af68803`](af688031a2) Merge [#438](https://github-redirect.dependabot.com/crossbeam-rs/crossbeam/issues/438)
- Additional commits viewable in [compare view](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-utils-0.6.0...crossbeam-utils-0.7.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`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<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 recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor 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 use this milestone` will set the current milestone 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)
- Pull request limits (per update run and/or open at any time)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

</details>
2019-11-07 15:29:17 +00:00
dependabot-preview[bot]
2ed8f4f013
Update crossbeam-utils requirement from 0.6 to 0.7
Updates the requirements on [crossbeam-utils](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/compare/crossbeam-utils-0.6.0...crossbeam-utils-0.7.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-07 05:12:30 +00:00
Eric Huss
da36b81a6b Fix some awkward wording. 2019-11-06 10:59:08 -08:00
bors
ba5cca20ac Auto merge of #7513 - Eh2406:ci, r=ehuss
don't download std-docs on CI

Now that we have a way to do it, lets not download std-docs on CI. Based on the blog post:
https://blog.rust-lang.org/2019/10/15/Rustup-1.20.0.html
2019-11-04 22:58:40 +00:00
Eh2406
e028b8765c only on nightly 2019-11-04 16:14:46 -05:00
Eh2406
5d35d90223 add rustc-dev 2019-11-04 15:31:20 -05:00
Eh2406
e4d5563ed3 use curl on windows 2019-11-03 10:51:18 -05:00
Eh2406
397dd68b5c use no-self-update 2019-11-02 21:38:55 -04:00
Eh2406
d1de600cd5 update is annoying 2019-11-02 21:33:14 -04:00
Eh2406
b5c5900e7e widows is annoying 2019-11-02 21:33:14 -04:00
Eh2406
5b658ab9ee dont download std-docs on CI 2019-11-02 21:33:14 -04:00
bors
6a7f505a18 Auto merge of #7553 - EverlastingBugstopper:patch-1, r=alexcrichton
Change my-buddy to github-handle

This change has the benefit of being both more descriptive and gender neutral
2019-10-29 20:26:58 +00:00
Avery Harnish
0255a5ee37
Change my-buddy to github-handle
This change has the dual benefit of being both more descriptive and gender neutral
2019-10-29 15:23:34 -05:00
bors
5da4b4d479 Auto merge of #7376 - ehuss:filter-platform, r=alexcrichton
Add --filter-platform to `cargo metadata`.

This adds the `--filter-platform` flag to `cargo metadata` to give users a way to filter the resolve information based on the target triple.

This is just a prototype to open for feedback.  Some things that need feedback:

- Debate the name of the flag.
- It uses "host" as a special triple to mean the local host.  Does that make sense?  It seemed a little weird.
- Should it also filter the dependencies in the "packages" array?  Right now it only does resolve.  I'm on the fence. It probably should, but that would be an intrusive change to rewrite the Package values.
- Should the filtering be transitive?  That is, if a package is only reachable by a specific platform, should it be removed from the resolve "nodes"?  What about "packages"?  Currently it is included, with the intent that you walk the resolve starting with a root (like a workspace member).  But it might be surprising to see "winapi" when you filter for a unix platform.

This will need documentation before it is merged.
2019-10-28 21:53:41 +00:00