]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoAuto merge of #3725 - mikerite:fix-2728, r=phansch
bors [Mon, 4 Feb 2019 05:52:44 +0000 (05:52 +0000)]
Auto merge of #3725 - mikerite:fix-2728, r=phansch

Fix `cast_sign_loss` false positive

This checks if the value is a non-negative constant before linting about
losing the sign.

Because the `constant` function doesn't handle const functions, we check if
the value is from a call to a `max_value` function directly. A utility method
called `get_def_path` was added to make checking for the function paths
easier.

Fixes #2728

5 years agoDocument `get_def_path`
Michael Wright [Mon, 4 Feb 2019 05:29:19 +0000 (07:29 +0200)]
Document `get_def_path`

5 years agoMerge pull request #3735 from jsgf/setup-toolchain
Manish Goregaokar [Mon, 4 Feb 2019 05:14:07 +0000 (21:14 -0800)]
Merge pull request #3735 from jsgf/setup-toolchain

Add setup-toolchain.sh script to configure the master version of rustc,

5 years agoAdd setup-toolchain.sh script to configure the master version of rustc,
Jeremy Fitzhardinge [Sat, 2 Feb 2019 19:54:18 +0000 (11:54 -0800)]
Add setup-toolchain.sh script to configure the master version of rustc,
and update CONTRIBUTING.md accordingly.

5 years agoAuto merge of #3737 - phansch:2018, r=phansch
bors [Sun, 3 Feb 2019 15:24:54 +0000 (15:24 +0000)]
Auto merge of #3737 - phansch:2018, r=phansch

Transition leftover test libs to Rust 2018

To tick off some checkboxes in https://github.com/rust-lang/rust/issues/58099 =)

5 years agoTransition leftover test libs to Rust 2018
Philipp Hansch [Sun, 3 Feb 2019 13:47:03 +0000 (14:47 +0100)]
Transition leftover test libs to Rust 2018

5 years agoAuto merge of #3723 - rhysd:issue3721, r=oli-obk
bors [Sun, 3 Feb 2019 13:03:41 +0000 (13:03 +0000)]
Auto merge of #3723 - rhysd:issue3721, r=oli-obk

Implement dbg_macro rule

Fixes  #3721

This patch adds new `dbg_macro` rule to check `dbg!` macro use.

Since this is my first patch to clippy, I'm not confident about following points:

- ~~Currently only checks `dbg!` span. Is it possible to check if the `dbg!` macro is provided by standard library or user-defined? If it's possible, I can make the check more strict.~~ Resolved as https://github.com/rust-lang/rust-clippy/pull/3723#discussion_r252417934
- ~~Is category `style` correct for this rule?~~'restriction' is used instead
- ~~Should I use `span_lint_and_sugg` instead of `span_lint`? Currently entire message is put as `msg`.  But later part `ensure to avoid having uses of it in version control` may be put as suggestion.~~ Done
- I'm not native English speaker. The message and doc may not be natural as English.

5 years agorun `util/dev update_lints` and `cargo fmt --all`
rhysd [Sun, 3 Feb 2019 12:28:43 +0000 (21:28 +0900)]
run `util/dev update_lints` and `cargo fmt --all`

5 years agoMerge branch 'master' into issue3721
rhysd [Sun, 3 Feb 2019 12:27:23 +0000 (21:27 +0900)]
Merge branch 'master' into issue3721

5 years agoprefer `if` to `match`
rhysd [Sun, 3 Feb 2019 09:50:00 +0000 (18:50 +0900)]
prefer `if` to `match`

5 years agouse snippet for making a suggestion if possible
rhysd [Sun, 3 Feb 2019 09:28:42 +0000 (18:28 +0900)]
use snippet for making a suggestion if possible

5 years agoAuto merge of #3736 - mikerite:fix-build-20190203, r=phansch
bors [Sun, 3 Feb 2019 08:42:14 +0000 (08:42 +0000)]
Auto merge of #3736 - mikerite:fix-build-20190203, r=phansch

Fix breakage due to rust-lang/rust#58079

The rustc change added HirId to a few nodes. As I understand it, the plan is
to remove the NodeId from these nodes eventually. Where the NodeId was
not being matched, I used `..` to try and avoid further breakage. Where it
was, I used `_` to make the fix easier when NodeId is removed.

5 years agoFix breakage due to rust-lang/rust#58079
Michael Wright [Sun, 3 Feb 2019 07:12:07 +0000 (09:12 +0200)]
Fix breakage due to rust-lang/rust#58079

The rustc change added HirId to a few nodes. As I understand it, the plan is
to remove the NodeId from these nodes eventually. Where the NodeId was
not being matched, I used `..` to try and avoid further breakage. Where it
was, I used `_` to make the fix easier when NodeId is removed.

5 years agoAuto merge of #2857 - avborhanian:master, r=phansch
bors [Sat, 2 Feb 2019 08:32:27 +0000 (08:32 +0000)]
Auto merge of #2857 - avborhanian:master, r=phansch

Adding lint test for excessive LOC.

This is a WIP for #2377. Just wanted to pull in because I had a few questions:

1. Is it okay that I'm approaching this via counting by looking at each line in the snippet instead of looking at the AST tree? If there's another way to do it, I want to make sure I'm doing the correct way, but I wasn't sure since the output AST JSON doesn't seem to contain whitespace.

2. My function is definitely going to trigger the lint, so also wanted to see if there was something obvious I could do to reduce it.

3. Are the two tests fine, or is there something obvious I'm missing?

4. Obviously bigger question - am I approaching the line count correctly. Current strategy is count a line if it contains some code, so skip if it's just comments or empty.

5 years agoAuto merge of #3731 - phansch:travis, r=phansch
bors [Sat, 2 Feb 2019 00:12:32 +0000 (00:12 +0000)]
Auto merge of #3731 - phansch:travis, r=phansch

Travis: Don't run integration tests on every PR commit

This does not save Clippy any time but it makes sure that the concurrent
build limit is not reached as quickly for the `rust-lang` Travis
account.

I can't create a permalink to the discussion somehow, so here's an
excerpt from the Infra channel:

```
[11:57 PM] pietroalbini: there is a clippy build (20 jobs) and a packed_simd one (42 builders)  and a rustc one which isn't scheduling atm
[11:58 PM] pietroalbini: I don't think there is a way to prioritize rustc builds in the queue on travis, right?
[12:22 AM] alexcrichton: pietro: I don't think so no
[12:22 AM] alexcrichton: If it's a problem we should cull builds on other projects
[12:22 AM] alexcrichton: The rust repo is the #1 priority
```

Since the integration tests are rarely failing these days, I think it's
fine to not run them on every commit.

If needed, it's also still possible to do a complete test run with `@bors try`.

5 years agoAuto merge of #3732 - phansch:fix_ice_3720, r=oli-obk
bors [Fri, 1 Feb 2019 23:49:46 +0000 (23:49 +0000)]
Auto merge of #3732 - phansch:fix_ice_3720, r=oli-obk

Fix ICE in vec_box lint and add run-rustfix

Includes https://github.com/rust-lang/rust-clippy/pull/3726

`hir::Ty` doesn't seem to know anything about type bounds and
`cx.tcx.type_of(def_id)` caused an ICE when it was passed a generic type
with a bound:

```
src/librustc_typeck/collect.rs:1311: unexpected non-type Node::GenericParam: Type { default: None, synthetic: None }
```

Converting it to a proper `Ty` fixes the ICE and catches a few more places
where the lint applies.

Fixes #3720

5 years agoadd more test cases for dbg_macro rule
rhysd [Fri, 1 Feb 2019 19:54:51 +0000 (04:54 +0900)]
add more test cases for dbg_macro rule

5 years agoUpdate clippy_lints/src/types.rs
Philipp Hansch [Fri, 1 Feb 2019 19:53:15 +0000 (14:53 -0500)]
Update clippy_lints/src/types.rs

Co-Authored-By: avborhanian <avborhanian@gmail.com>
5 years agoUpdate clippy_lints/src/types.rs
Philipp Hansch [Fri, 1 Feb 2019 19:52:56 +0000 (14:52 -0500)]
Update clippy_lints/src/types.rs

Co-Authored-By: avborhanian <avborhanian@gmail.com>
5 years agouse span_help_and_lint() instead of span_lint_and_sugg()
rhysd [Fri, 1 Feb 2019 19:52:21 +0000 (04:52 +0900)]
use span_help_and_lint() instead of span_lint_and_sugg()

5 years agoUpdating code to ignore rustfmt issue.
Unknown [Fri, 1 Feb 2019 18:19:55 +0000 (13:19 -0500)]
Updating code to ignore rustfmt issue.

5 years agoUpdated readme.
Unknown [Fri, 1 Feb 2019 05:16:08 +0000 (00:16 -0500)]
Updated readme.

5 years agoChanging single character string to a character match.
Unknown [Fri, 1 Feb 2019 04:50:55 +0000 (23:50 -0500)]
Changing single character string to a character match.

5 years agoFix test broken by removing comment.
Unknown [Tue, 15 Jan 2019 03:32:12 +0000 (22:32 -0500)]
Fix test broken by removing comment.

5 years agoUpdating to just warn for one test.
Unknown [Tue, 15 Jan 2019 02:38:15 +0000 (21:38 -0500)]
Updating to just warn for one test.

5 years agoAdding back tests, but also reducing threshold by 1
Unknown [Sun, 13 Jan 2019 22:53:56 +0000 (17:53 -0500)]
Adding back tests, but also reducing threshold by 1

5 years agorustfmt
Unknown [Sun, 13 Jan 2019 21:53:26 +0000 (16:53 -0500)]
rustfmt

5 years agoMoving tests to ui-toml to make use of clippy.toml
Unknown [Sun, 13 Jan 2019 21:26:20 +0000 (16:26 -0500)]
Moving tests to ui-toml to make use of clippy.toml

5 years agoUpdating number of lines for the failing test to be > 100.
Unknown [Sun, 13 Jan 2019 16:07:14 +0000 (11:07 -0500)]
Updating number of lines for the failing test to be > 100.

Due to updating the configuration to be 101 instead of 51

5 years agoAdding lint for too many lines.
Araam Borhanian [Sun, 13 Jan 2019 15:19:02 +0000 (10:19 -0500)]
Adding lint for too many lines.

5 years agoSkipping check if in external macro.
Unknown [Sat, 19 Jan 2019 22:35:32 +0000 (17:35 -0500)]
Skipping check if in external macro.

5 years agoFix test broken by removing comment.
Unknown [Tue, 15 Jan 2019 03:32:12 +0000 (22:32 -0500)]
Fix test broken by removing comment.

5 years agoUpdating to just warn for one test.
Unknown [Tue, 15 Jan 2019 02:38:15 +0000 (21:38 -0500)]
Updating to just warn for one test.

5 years agoAdding back tests, but also reducing threshold by 1
Unknown [Sun, 13 Jan 2019 22:53:56 +0000 (17:53 -0500)]
Adding back tests, but also reducing threshold by 1

5 years agorustfmt
Unknown [Sun, 13 Jan 2019 21:53:26 +0000 (16:53 -0500)]
rustfmt

5 years agoMoving tests to ui-toml to make use of clippy.toml
Unknown [Sun, 13 Jan 2019 21:26:20 +0000 (16:26 -0500)]
Moving tests to ui-toml to make use of clippy.toml

5 years agoReworking function logic, and adding doc example.
Unknown [Sun, 13 Jan 2019 21:26:03 +0000 (16:26 -0500)]
Reworking function logic, and adding doc example.

This should fix line count logic issues that the previous code had, with assumptions it would make.

5 years agoRunning util/dev to update README/CHANGELOG
Unknown [Sun, 13 Jan 2019 16:42:09 +0000 (11:42 -0500)]
Running util/dev to update README/CHANGELOG

5 years agoUpdating number of lines for the failing test to be > 100.
Unknown [Sun, 13 Jan 2019 16:07:14 +0000 (11:07 -0500)]
Updating number of lines for the failing test to be > 100.

Due to updating the configuration to be 101 instead of 51

5 years agoAdding lint for too many lines.
Araam Borhanian [Sun, 13 Jan 2019 15:19:02 +0000 (10:19 -0500)]
Adding lint for too many lines.

5 years agoRemove conditionals from base builds
Philipp Hansch [Fri, 1 Feb 2019 17:27:09 +0000 (18:27 +0100)]
Remove conditionals from base builds

We _always_ want to execute these, also on the master branch.

5 years agoMake vec_box MachineApplicable
Philipp Hansch [Fri, 1 Feb 2019 07:42:01 +0000 (08:42 +0100)]
Make vec_box MachineApplicable

5 years agoFix ICE in vec_box lint and add run-rustfix
Philipp Hansch [Fri, 1 Feb 2019 07:21:32 +0000 (08:21 +0100)]
Fix ICE in vec_box lint and add run-rustfix

`hir::Ty` doesn't seem to know anything about type bounds and
`cx.tcx.type_of(def_id)` caused an ICE when it was passed a generic type
with a bound:

```
src/librustc_typeck/collect.rs:1311: unexpected non-type Node::GenericParam: Type { default: None, synthetic: None }
```

Converting it to a proper `Ty` fixes the ICE and catches a few more
places where the lint applies.

5 years agoAuto merge of #3726 - phansch:some_renaming, r=oli-obk
bors [Fri, 1 Feb 2019 08:36:11 +0000 (08:36 +0000)]
Auto merge of #3726 - phansch:some_renaming, r=oli-obk

Some renamings: s/ast_ty/hir_ty and s/StructField/hir::StructField

I think in both cases the new names make the code more understandable.
For `StructField` specifically because there's one in
[`syntax::ast`][ast] and one in [`rustc::hir`][hir].

[ast]: https://doc.rust-lang.org/nightly/nightly-rustc/syntax/ast/struct.StructField.html
[hir]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc/hir/struct.StructField.html

5 years agoTravis: Don't run integration tests on every PR commit
Philipp Hansch [Fri, 1 Feb 2019 06:34:36 +0000 (07:34 +0100)]
Travis: Don't run integration tests on every PR commit

This does not save Clippy any time but it makes sure that the concurrent
build limit is not reached as quickly for the `rust-lang` Travis
account.

I can't create a permalink to the discussion somehow, so here's an
excerpt from the Infra channel:

```
[11:57 PM] pietroalbini: there is a clippy build (20 jobs) and a packed_simd one (42 builders)  and a rustc one which isn't scheduling atm
[11:58 PM] pietroalbini: I don't think there is a way to prioritize rustc builds in the queue on travis, right?
[12:22 AM] alexcrichton: pietro: I don't think so no
[12:22 AM] alexcrichton: If it's a problem we should cull builds on other projects
[12:22 AM] alexcrichton: The rust repo is the #1 priority
```

Since the integration tests are rarely failing these days, I think it's
fine to not run them on every commit.

If needed, it's also still possible to do a `try` build with `@bors try`.

5 years agoMove `max_value` handling to consts module
Michael Wright [Fri, 1 Feb 2019 04:32:16 +0000 (06:32 +0200)]
Move `max_value` handling to consts module

5 years agoMerge branch 'master' into fix-2728
Michael Wright [Fri, 1 Feb 2019 04:27:36 +0000 (06:27 +0200)]
Merge branch 'master' into fix-2728

5 years ago`cargo +nightly fmt` at clippy_lints/
rhysd [Fri, 1 Feb 2019 03:03:13 +0000 (12:03 +0900)]
`cargo +nightly fmt` at clippy_lints/

5 years agoremove TODO comment which was already done
rhysd [Fri, 1 Feb 2019 02:39:35 +0000 (11:39 +0900)]
remove TODO comment which was already done

5 years agoadd dbg_macro rule to CHANGELOG.md and update count in README
rhysd [Fri, 1 Feb 2019 02:25:33 +0000 (11:25 +0900)]
add dbg_macro rule to CHANGELOG.md and update count in README

5 years agofix category and use suggestion
rhysd [Fri, 1 Feb 2019 00:23:40 +0000 (09:23 +0900)]
fix category and use suggestion

5 years agoAuto merge of #3727 - phansch:rustup_unused_trim, r=matthiaskrgr
bors [Thu, 31 Jan 2019 10:01:13 +0000 (10:01 +0000)]
Auto merge of #3727 - phansch:rustup_unused_trim, r=matthiaskrgr

Rustup: unused trim result

Caused by https://github.com/rust-lang/rust/pull/57106

r? @matthiaskrgr

5 years agoRustup: unused trim result
Philipp Hansch [Thu, 31 Jan 2019 07:27:04 +0000 (08:27 +0100)]
Rustup: unused trim result

5 years agoSome renamings: s/ast_ty/hir_ty and s/StructField/hir::StructField
Philipp Hansch [Thu, 31 Jan 2019 06:11:22 +0000 (07:11 +0100)]
Some renamings: s/ast_ty/hir_ty and s/StructField/hir::StructField

I think in both cases the new names make the code more understandable.
For `StructField` specifically because there's one in
[`syntax::ast`][ast] and one in [`rustc::hir`][hir].

[ast]: https://doc.rust-lang.org/nightly/nightly-rustc/syntax/ast/struct.StructField.html
[hir]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc/hir/struct.StructField.html

5 years agoFix `cast_sign_loss` false positive
Michael Wright [Thu, 31 Jan 2019 04:20:49 +0000 (06:20 +0200)]
Fix `cast_sign_loss` false positive

This checks if the value is a non-negative constant before linting about
losing the sign.

Because the `constant` function doesn't handle const functions, we check if
the value is from a call to a `max_value` function directly. A utility method
called `get_def_path` was added to make checking for the function paths
easier.

Fixes #2728

5 years agoimplement dbg_macro rule (fixes #3721)
rhysd [Wed, 30 Jan 2019 17:39:38 +0000 (02:39 +0900)]
implement dbg_macro rule (fixes #3721)

5 years agoAuto merge of #3652 - Aehmlo:where_the_wild_things_are, r=phansch
bors [Tue, 29 Jan 2019 22:48:03 +0000 (22:48 +0000)]
Auto merge of #3652 - Aehmlo:where_the_wild_things_are, r=phansch

Add wildcard_match_arm lint

This lint prevents using a wildcard in a match arm. Implemented as a restriction currently, because this is pretty much an edge case. See #3649 for more information.

Didn't add any tests because I wasn't sure how, but if someone wants to point me in the right direction, I'd be happy to!

5 years agowildcard_match_arm: Update lint count.
Alex Hamilton [Tue, 29 Jan 2019 21:33:16 +0000 (15:33 -0600)]
wildcard_match_arm: Update lint count.

5 years agowildcard_match_arm: add nesting issue to known.
Alex Hamilton [Tue, 29 Jan 2019 20:34:04 +0000 (14:34 -0600)]
wildcard_match_arm: add nesting issue to known.

5 years agowildcard_match_arm: lint only enum matches.
Alex Hamilton [Tue, 29 Jan 2019 20:25:40 +0000 (14:25 -0600)]
wildcard_match_arm: lint only enum matches.

5 years agowildcard_match_arm: update ui test stderr
Alex Hamilton [Tue, 29 Jan 2019 18:39:01 +0000 (12:39 -0600)]
wildcard_match_arm: update ui test stderr

5 years agowildcard_match_arm: format test.
Alex Hamilton [Tue, 29 Jan 2019 18:23:11 +0000 (12:23 -0600)]
wildcard_match_arm: format test.

5 years agowilcard_match_arm: run rustfmt.
Alex Hamilton [Sun, 27 Jan 2019 21:41:22 +0000 (15:41 -0600)]
wilcard_match_arm: run rustfmt.

5 years agowildcard_match_arm: add lint properly.
Alex Hamilton [Fri, 25 Jan 2019 17:06:19 +0000 (11:06 -0600)]
wildcard_match_arm: add lint properly.

5 years agowildcard_match_arm: rename function.
Alex Hamilton [Fri, 25 Jan 2019 16:56:00 +0000 (10:56 -0600)]
wildcard_match_arm: rename function.

We also don't need `ex` as an argument.

5 years agowildcard_match_arm: add simple ui test.
Alex Hamilton [Fri, 25 Jan 2019 16:42:11 +0000 (10:42 -0600)]
wildcard_match_arm: add simple ui test.

5 years agowildcard_match_arm: expand lint scope.
Alex Hamilton [Fri, 25 Jan 2019 16:39:09 +0000 (10:39 -0600)]
wildcard_match_arm: expand lint scope.

We're not only working with Results.

5 years agoChange match_wild lint name to WILDCARD_MATCH_ARM.
Alex Hamilton [Sat, 12 Jan 2019 23:45:16 +0000 (17:45 -0600)]
Change match_wild lint name to WILDCARD_MATCH_ARM.

Also fix message capitalization.

5 years agoAdd match_wild lint (#3649).
Alex Hamilton [Thu, 10 Jan 2019 20:56:28 +0000 (14:56 -0600)]
Add match_wild lint (#3649).

This lint prevents using a wildcard in a match.

5 years agoAuto merge of #3648 - phansch:const_fn_lint, r=oli-obk
bors [Tue, 29 Jan 2019 19:58:13 +0000 (19:58 +0000)]
Auto merge of #3648 - phansch:const_fn_lint, r=oli-obk

Add initial version of const_fn lint

This adds an initial version of a lint that can tell if a function could be `const`.

TODO:

- [x] Finish up the docs
- [x] Fix the ICE

cc #2440

5 years agoAuto merge of #3716 - matthiaskrgr:sh, r=phansch
bors [Tue, 29 Jan 2019 19:06:33 +0000 (19:06 +0000)]
Auto merge of #3716 - matthiaskrgr:sh, r=phansch

fetch_prs_between: add .sh file ending

r? @phansch

5 years agofetch_prs_between: add .sh file ending
Matthias Krüger [Tue, 29 Jan 2019 19:00:45 +0000 (20:00 +0100)]
fetch_prs_between: add .sh file ending

5 years agocargo fmt
Philipp Hansch [Wed, 23 Jan 2019 06:32:58 +0000 (07:32 +0100)]
cargo fmt

5 years agoAuto merge of #3714 - mikerite:fix-2945, r=oli-obk
bors [Tue, 29 Jan 2019 11:57:26 +0000 (11:57 +0000)]
Auto merge of #3714 - mikerite:fix-2945, r=oli-obk

Fix `unit_arg` false positive

Ignore arguments with the question mark operator.

Closes #2945

5 years agoUpdate various docs
Philipp Hansch [Tue, 22 Jan 2019 06:59:09 +0000 (07:59 +0100)]
Update various docs

* `const_transmute` currently also seems to depend on the `const_fn`
  feature.
* Only `Sized` is currently allowed as a bound, not Copy.

5 years agoUse built-in entry_fn detection over self-built
Philipp Hansch [Tue, 22 Jan 2019 06:36:15 +0000 (07:36 +0100)]
Use built-in entry_fn detection over self-built

5 years agocargo fmt
Philipp Hansch [Mon, 21 Jan 2019 06:54:05 +0000 (07:54 +0100)]
cargo fmt

5 years agoReorganize conditionals: Run faster checks first
Philipp Hansch [Mon, 14 Jan 2019 15:44:10 +0000 (16:44 +0100)]
Reorganize conditionals: Run faster checks first

5 years agoMaybe fix ICE?
Philipp Hansch [Thu, 10 Jan 2019 19:33:24 +0000 (20:33 +0100)]
Maybe fix ICE?

5 years agoAdd initial version of const_fn lint
Philipp Hansch [Wed, 9 Jan 2019 19:11:37 +0000 (20:11 +0100)]
Add initial version of const_fn lint

5 years agoFix `unit_arg` false positive
Michael Wright [Tue, 29 Jan 2019 05:22:08 +0000 (07:22 +0200)]
Fix `unit_arg` false positive

Ignore arguments with the question mark operator.

Closes #2945

5 years agoAuto merge of #3700 - phansch:would_you_like_some_help_with_this_const_fn, r=oli-obk
bors [Mon, 28 Jan 2019 14:30:18 +0000 (14:30 +0000)]
Auto merge of #3700 - phansch:would_you_like_some_help_with_this_const_fn, r=oli-obk

Prevent incorrect cast_lossless suggestion in const_fn

`::from` is not a const fn, so applying the suggestion of
`cast_lossless` would fail to compile. The fix is to skip the lint if
the cast is found inside a const fn.

Fixes #3656

5 years agoAuto merge of #3711 - rust-lang:rustup, r=oli-obk
bors [Mon, 28 Jan 2019 11:37:45 +0000 (11:37 +0000)]
Auto merge of #3711 - rust-lang:rustup, r=oli-obk

Rustup

fixes #3709

I'm currently in the process of making rustc's deprecation lint emit the `AtomicFoo::new(0)` suggestion

5 years agoRustfmt
Oliver Scherer [Mon, 28 Jan 2019 10:32:41 +0000 (11:32 +0100)]
Rustfmt

5 years agoCheck hypothetically failing conversion
Oliver Scherer [Mon, 28 Jan 2019 09:32:34 +0000 (10:32 +0100)]
Check hypothetically failing conversion

5 years agoRemove tests for deprecated items
Oliver Scherer [Mon, 28 Jan 2019 09:17:04 +0000 (10:17 +0100)]
Remove tests for deprecated items

5 years agoUpdate more changed iterator paths
Oliver Scherer [Mon, 28 Jan 2019 09:16:34 +0000 (10:16 +0100)]
Update more changed iterator paths

5 years agoAtomics constants are now handled by the deprecation lint
Oliver Scherer [Mon, 28 Jan 2019 09:10:27 +0000 (10:10 +0100)]
Atomics constants are now handled by the deprecation lint

5 years agoUpdate changed iterator paths
Oliver Scherer [Mon, 28 Jan 2019 09:09:45 +0000 (10:09 +0100)]
Update changed iterator paths

5 years agoUpdate const slice processing
Oliver Scherer [Mon, 28 Jan 2019 09:09:34 +0000 (10:09 +0100)]
Update const slice processing

5 years agoAuto merge of #3706 - robamler:patch-1, r=phansch
bors [Sun, 27 Jan 2019 13:34:47 +0000 (13:34 +0000)]
Auto merge of #3706 - robamler:patch-1, r=phansch

Fix documentation for `slow_vector_initialization`

This PR fixes the documentation for the lint `slow_vector_initialization`. The documentation recommended writing `vec![len; 0]` but the correct solution is `vec![0; len]`.

5 years agoAuto merge of #3705 - matthiaskrgr:rustup, r=phansch
bors [Sun, 27 Jan 2019 13:14:37 +0000 (13:14 +0000)]
Auto merge of #3705 - matthiaskrgr:rustup, r=phansch

rustup

rustup https://github.com/rust-lang/rust/pull/57907/ and https://github.com/rust-lang/rust/pull/57726
Fixes #3708

5 years agoupdate test stderr
Matthias Krüger [Sun, 27 Jan 2019 12:46:22 +0000 (13:46 +0100)]
update test stderr

5 years agorun cargo fmt
Matthias Krüger [Sun, 27 Jan 2019 12:34:23 +0000 (13:34 +0100)]
run cargo fmt

5 years agorustup https://github.com/rust-lang/rust/pull/57907/
Matthias Krüger [Sun, 27 Jan 2019 12:33:56 +0000 (13:33 +0100)]
rustup https://github.com/rust-lang/rust/pull/57907/

for file in `fd \.rs$` ; do sed  -i  s/span_suggestion_with_applicability/span_suggestion/g $file ; done

for file in `fd \.rs$` ; do sed  -i  s/span_suggestion_short_with_applicability/span_suggestion_short/g $file ; done

for file in `fd \.rs$` ; do sed  -i  s/span_suggestions_with_applicability/span_suggestions/g $file ; done

5 years agoFix documentation for `slow_vector_initialization`
Robert Bamler [Sun, 27 Jan 2019 04:26:38 +0000 (20:26 -0800)]
Fix documentation for `slow_vector_initialization`

Change the recommended solution from `vec![len; 0]` to `vec![0; len]`.

Also fix grammar.

5 years agorustup https://github.com/rust-lang/rust/pull/57726
Matthias Krüger [Sat, 26 Jan 2019 19:40:55 +0000 (20:40 +0100)]
rustup https://github.com/rust-lang/rust/pull/57726

5 years agoAuto merge of #3702 - phansch:changechangelog, r=matthiaskrgr
bors [Sat, 26 Jan 2019 11:58:35 +0000 (11:58 +0000)]
Auto merge of #3702 - phansch:changechangelog, r=matthiaskrgr

Remove unsafe_vector_initialization from added lints

It was deprecated before it reached a stable release,
no need to include it.

5 years agoRemove unsafe_vector_initialization from added lints
Philipp Hansch [Sat, 26 Jan 2019 11:50:40 +0000 (12:50 +0100)]
Remove unsafe_vector_initialization from added lints

It was deprecated before it reached a stable release,
no need to include it.

5 years agoAuto merge of #3690 - mikerite:fix-3630-expect-fun-call, r=phansch
bors [Sat, 26 Jan 2019 10:57:39 +0000 (10:57 +0000)]
Auto merge of #3690 - mikerite:fix-3630-expect-fun-call, r=phansch

Fix `expect_fun_call` lint suggestions

This commit corrects some bad suggestions produced by the
`expect_fun_call` lint and enables `rust-fix` checking on the tests.

Addresses #3630