]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoMerge pull request #3465 from flip1995/rustfmt
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer [Wed, 28 Nov 2018 15:19:55 +0000 (16:19 +0100)]
Merge pull request #3465 from flip1995/rustfmt

rustfmt everything once and for all

5 years agoMerge pull request #3466 from phansch/clippy_rfc_readme
Philipp Krones [Wed, 28 Nov 2018 14:40:44 +0000 (15:40 +0100)]
Merge pull request #3466 from phansch/clippy_rfc_readme

Update docs in regards to the merged RFC

5 years agoAdd missing word
Philipp Krones [Wed, 28 Nov 2018 13:39:25 +0000 (14:39 +0100)]
Add missing word

Co-Authored-By: phansch <dev@phansch.net>
5 years agoUpdate docs in regards to the merged RFC
Philipp Hansch [Wed, 28 Nov 2018 07:11:28 +0000 (08:11 +0100)]
Update docs in regards to the merged RFC

5 years agoMerge pull request #3464 from flip1995/no_fork_integration
Philipp Hansch [Wed, 28 Nov 2018 06:19:49 +0000 (07:19 +0100)]
Merge pull request #3464 from flip1995/no_fork_integration

Don't run integration tests in forks

5 years agoDocument how to run rustfmt in CONTRIBUTING.md
flip1995 [Tue, 27 Nov 2018 21:36:25 +0000 (22:36 +0100)]
Document how to run rustfmt in CONTRIBUTING.md

5 years agoDon't run integration tests in forks
flip1995 [Tue, 27 Nov 2018 21:01:22 +0000 (22:01 +0100)]
Don't run integration tests in forks

5 years agoFix some formatting issues
flip1995 [Tue, 27 Nov 2018 20:49:09 +0000 (21:49 +0100)]
Fix some formatting issues

5 years agoRun rustfmt on clippy_lints
flip1995 [Tue, 27 Nov 2018 20:14:15 +0000 (21:14 +0100)]
Run rustfmt on clippy_lints

5 years agoRun rustfmt on build.rs
flip1995 [Tue, 27 Nov 2018 20:13:26 +0000 (21:13 +0100)]
Run rustfmt on build.rs

5 years agoRun rustfmt on clippy_dev
flip1995 [Tue, 27 Nov 2018 20:13:08 +0000 (21:13 +0100)]
Run rustfmt on clippy_dev

5 years agoRun rustfmt on rustc_tools_util
flip1995 [Tue, 27 Nov 2018 20:12:38 +0000 (21:12 +0100)]
Run rustfmt on rustc_tools_util

5 years agoRun rustfmt on src
flip1995 [Tue, 27 Nov 2018 20:12:13 +0000 (21:12 +0100)]
Run rustfmt on src

5 years agoRun rustfmt on the tests
flip1995 [Tue, 27 Nov 2018 20:11:50 +0000 (21:11 +0100)]
Run rustfmt on the tests

5 years agoLet travis run cargo fmt --all -- --check
flip1995 [Tue, 27 Nov 2018 20:11:05 +0000 (21:11 +0100)]
Let travis run cargo fmt --all -- --check

5 years agoError on line overflow
flip1995 [Tue, 27 Nov 2018 19:46:11 +0000 (20:46 +0100)]
Error on line overflow

5 years agoMerge pull request #3459 from flip1995/sugg_appl
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer [Tue, 27 Nov 2018 17:29:33 +0000 (18:29 +0100)]
Merge pull request #3459 from flip1995/sugg_appl

Add Applicability to suggestion lints: Take 2

5 years agoFix NAIVE_BYTECOUNT applicability
flip1995 [Tue, 27 Nov 2018 16:31:17 +0000 (17:31 +0100)]
Fix NAIVE_BYTECOUNT applicability

5 years agoFix dogfood error
flip1995 [Tue, 27 Nov 2018 15:59:52 +0000 (16:59 +0100)]
Fix dogfood error

5 years agoChange Applicability of MISTYPED_LITERAL_SUFFIX
flip1995 [Tue, 27 Nov 2018 15:59:39 +0000 (16:59 +0100)]
Change Applicability of MISTYPED_LITERAL_SUFFIX

5 years agoAdd applicability level to (nearly) every span_lint_and_sugg function
flip1995 [Tue, 27 Nov 2018 14:13:57 +0000 (15:13 +0100)]
Add applicability level to (nearly) every span_lint_and_sugg function

5 years agoUpdate stderr file
flip1995 [Tue, 27 Nov 2018 14:27:34 +0000 (15:27 +0100)]
Update stderr file

5 years agoFix bugs and improve documentation
flip1995 [Tue, 27 Nov 2018 14:11:13 +0000 (15:11 +0100)]
Fix bugs and improve documentation

Some bugs and some documentation is unrelated to the Applicability change, but
these bugs were serious and the documentation was kind of required to
understand what's going on.

5 years agoAdd Applicability::Unspecified to span_lint_and_sugg functions
flip1995 [Tue, 20 Nov 2018 13:06:29 +0000 (14:06 +0100)]
Add Applicability::Unspecified to span_lint_and_sugg functions

5 years agoIntroduce snippet_with_applicability and hir_with_applicability functions
flip1995 [Tue, 20 Nov 2018 09:33:40 +0000 (10:33 +0100)]
Introduce snippet_with_applicability and hir_with_applicability functions

5 years agoMerge pull request #3412 from matthiaskrgr/readme_2
Philipp Krones [Mon, 26 Nov 2018 13:31:48 +0000 (14:31 +0100)]
Merge pull request #3412 from matthiaskrgr/readme_2

readme: tell how to install clippy on travis from git if it is not shipped with a nightly.

5 years agoreadme: tell how to install clippy on travis from git if it is not shipped with a...
Matthias Krüger [Sun, 4 Nov 2018 23:12:42 +0000 (00:12 +0100)]
readme: tell how to install clippy on travis from git if it is not shipped with a nightly.

5 years agoMerge pull request #3365 from gnieto/lint/slow-initialization
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer [Mon, 26 Nov 2018 12:37:46 +0000 (13:37 +0100)]
Merge pull request #3365 from gnieto/lint/slow-initialization

Add slow vector initializations lint

5 years agoMerge pull request #3456 from matthiaskrgr/builtin
Philipp Hansch [Mon, 26 Nov 2018 06:19:14 +0000 (07:19 +0100)]
Merge pull request #3456 from matthiaskrgr/builtin

constants: add u128 i128 builtin types and fix outdated url

5 years agoconstants: add u128 i128 builtin types and fix outdated url
Matthias Krüger [Mon, 26 Nov 2018 00:12:12 +0000 (01:12 +0100)]
constants: add u128 i128 builtin types and fix outdated url

5 years agoUpdate lints
Guillem Nieto [Sun, 25 Nov 2018 22:36:04 +0000 (14:36 -0800)]
Update lints

5 years agoLint only the first statment/expression after alloc
Guillem Nieto [Sun, 18 Nov 2018 22:45:53 +0000 (23:45 +0100)]
Lint only the first statment/expression after alloc

Instead of searching for all the successive expressions after a vector
allocation, check only the first expression.

This is done to minimize the amount of false positives of the lint.

5 years agoFix some warnings related to Self
Guillem Nieto [Mon, 5 Nov 2018 21:46:07 +0000 (22:46 +0100)]
Fix some warnings related to Self

5 years agoRename some symbols
Guillem Nieto [Tue, 30 Oct 2018 20:47:15 +0000 (21:47 +0100)]
Rename some symbols

Renamed some symbols in order to make them a little bit more accurate.

5 years agoSplit lint into slow and unsafe vector initalization
Guillem Nieto [Mon, 29 Oct 2018 23:25:05 +0000 (00:25 +0100)]
Split lint into slow and unsafe vector initalization

5 years agoAdd unsafe set_len initialization
Guillem Nieto [Fri, 26 Oct 2018 20:35:16 +0000 (22:35 +0200)]
Add unsafe set_len initialization

5 years agoAdd slow zero-filled vector initialization lint
Guillem Nieto [Thu, 18 Oct 2018 23:15:48 +0000 (01:15 +0200)]
Add slow zero-filled vector initialization lint

Add lint to detect slow zero-filled vector initialization. It detects
when a vector is zero-filled with extended with `repeat(0).take(len)`
or `resize(len, 0)`.
This zero-fillings are usually slower than simply using `vec![0; len]`.

5 years agoMerge pull request #3439 from dtolnay/npbv
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer [Sat, 24 Nov 2018 09:16:38 +0000 (10:16 +0100)]
Merge pull request #3439 from dtolnay/npbv

Downgrade needless_pass_by_value to allow by default

5 years agoMerge pull request #3453 from phansch/remove_sudo_false
Philipp Hansch [Fri, 23 Nov 2018 21:13:50 +0000 (22:13 +0100)]
Merge pull request #3453 from phansch/remove_sudo_false

Travis: Remove `sudo: false`

5 years agoTravis: Remove `sudo: false`
Philipp Hansch [Fri, 23 Nov 2018 20:47:02 +0000 (21:47 +0100)]
Travis: Remove `sudo: false`

5 years agoMerge pull request #3452 from matthiaskrgr/rustup
Philipp Hansch [Fri, 23 Nov 2018 09:38:20 +0000 (10:38 +0100)]
Merge pull request #3452 from matthiaskrgr/rustup

rustup https://github.com/rust-lang/rust/pull/54071/

5 years agorustup https://github.com/rust-lang/rust/pull/54071/
Matthias Krüger [Fri, 23 Nov 2018 09:05:51 +0000 (10:05 +0100)]
rustup https://github.com/rust-lang/rust/pull/54071/

5 years agoMerge pull request #3449 from matthiaskrgr/dep
Philipp Hansch [Thu, 22 Nov 2018 17:54:09 +0000 (18:54 +0100)]
Merge pull request #3449 from matthiaskrgr/dep

dependencies: update pulldown-cmark from 0.1 to 0.2

5 years agodependencies: update pulldown-cmark from 0.1 to 0.2
Matthias Krüger [Thu, 22 Nov 2018 17:04:34 +0000 (18:04 +0100)]
dependencies: update pulldown-cmark from 0.1 to 0.2

5 years agoMerge pull request #3447 from phansch/small_rename
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer [Thu, 22 Nov 2018 14:08:13 +0000 (15:08 +0100)]
Merge pull request #3447 from phansch/small_rename

s/file_map/source_map

5 years agoMerge pull request #3442 from rust-lang/version_ids
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer [Thu, 22 Nov 2018 09:46:08 +0000 (10:46 +0100)]
Merge pull request #3442 from rust-lang/version_ids

Enable rustup clippy to refer to the correct documentation

5 years agoMerge branch 'master' into version_ids
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer [Thu, 22 Nov 2018 09:22:25 +0000 (10:22 +0100)]
Merge branch 'master' into version_ids

5 years agoMerge pull request #3446 from matthiaskrgr/url_update
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer [Thu, 22 Nov 2018 08:38:56 +0000 (09:38 +0100)]
Merge pull request #3446 from matthiaskrgr/url_update

update urls (rust-lang-nursery => rust-lang)

5 years agos/file_map/source_map
Philipp Hansch [Thu, 22 Nov 2018 06:53:59 +0000 (07:53 +0100)]
s/file_map/source_map

5 years agomissed another one in the README
Matthias Krüger [Thu, 22 Nov 2018 03:50:00 +0000 (04:50 +0100)]
missed another one in the README

5 years agorun "util/dev update_lints"
Matthias Krüger [Thu, 22 Nov 2018 03:43:33 +0000 (04:43 +0100)]
run "util/dev update_lints"

5 years agorust-lang-nursery/rust-clippy => rust-lang/rust-clippy
Matthias Krüger [Thu, 22 Nov 2018 03:40:09 +0000 (04:40 +0100)]
rust-lang-nursery/rust-clippy => rust-lang/rust-clippy

5 years agoMerge #3437
bors[bot] [Wed, 21 Nov 2018 15:04:11 +0000 (15:04 +0000)]
Merge #3437

3437: issue #3318 Run trivially_copy_pass_by_ref for traits r=flip1995 a=waynr

Addresses #3318

Co-authored-by: Wayne Warren <wayne.warren.s@gmail.com>
Co-authored-by: Philipp Krones <hello@philkrones.com>
5 years agoMerge #3443
bors[bot] [Wed, 21 Nov 2018 14:11:24 +0000 (14:11 +0000)]
Merge #3443

3443: Document how to lint local Clippy changes with locally built Clippy r=flip1995 a=waynr

Co-authored-by: Wayne Warren <wayne.warren.s@gmail.com>
5 years agoAddress 'clippy::single-match' dogfood lint
Wayne Warren [Wed, 21 Nov 2018 12:05:52 +0000 (06:05 -0600)]
Address 'clippy::single-match' dogfood lint

5 years agoFix nit
Philipp Krones [Wed, 21 Nov 2018 12:08:33 +0000 (06:08 -0600)]
Fix nit

Co-Authored-By: waynr <wayne.warren.s@gmail.com>
5 years agoAddress travis CI lint failure
Wayne Warren [Wed, 21 Nov 2018 03:21:07 +0000 (21:21 -0600)]
Address travis CI lint failure

5 years agoUpdate trivially_copy_pass_by_ref with Trait stderr output
Wayne Warren [Wed, 21 Nov 2018 01:59:02 +0000 (19:59 -0600)]
Update trivially_copy_pass_by_ref with Trait stderr output

5 years agoissue#3318 run trivially_copy_pass_by_ref for traits
Wayne Warren [Wed, 21 Nov 2018 00:49:15 +0000 (18:49 -0600)]
issue#3318 run trivially_copy_pass_by_ref for traits

5 years agoUpdate trivially_copy_pass_by_ref with Trait examples
Wayne Warren [Wed, 21 Nov 2018 01:57:53 +0000 (19:57 -0600)]
Update trivially_copy_pass_by_ref with Trait examples

5 years agoFix awkward wording
Wayne Warren [Wed, 21 Nov 2018 13:16:03 +0000 (07:16 -0600)]
Fix awkward wording

5 years agoDocument how to lint local Clippy changes with locally built Clippy
Wayne Warren [Wed, 21 Nov 2018 13:12:00 +0000 (07:12 -0600)]
Document how to lint local Clippy changes with locally built Clippy

5 years agoMerge #3441
bors[bot] [Wed, 21 Nov 2018 12:42:57 +0000 (12:42 +0000)]
Merge #3441

3441: rustup https://github.com/rust-lang/rust/pull/52591 r=flip1995 a=matthiaskrgr

Co-authored-by: Matthias Krüger <matthias.krueger@famsik.de>
5 years agoEnable rustup clippy to refer to the correct documentation
Oliver Scherer [Wed, 21 Nov 2018 12:33:42 +0000 (13:33 +0100)]
Enable rustup clippy to refer to the correct documentation

5 years agorustup https://github.com/rust-lang/rust/pull/52591
Matthias Krüger [Wed, 21 Nov 2018 12:29:23 +0000 (13:29 +0100)]
rustup https://github.com/rust-lang/rust/pull/52591

5 years agoDowngrade needless_pass_by_value to allow by default
David Tolnay [Wed, 21 Nov 2018 09:58:27 +0000 (01:58 -0800)]
Downgrade needless_pass_by_value to allow by default

I noticed that I suppress this lint in many of my projects.

https://github.com/search?q=needless_pass_by_value+user%3Adtolnay&type=Code
https://github.com/search?q=needless_pass_by_value+user%3Aserde-rs&type=Code

Upon further inspection, this lint has a *long* history of false
positives (and several remaining).

Generally I feel that this lint is the definition of pedantic and should
not be linted by default.

    #[derive(Debug)]
    enum How {
        ThisWay,
        ThatWay,
    }

    // Are we really better off forcing the call sites to write f(&_)...?
    fn f(how: How) {
        println!("You want to do it {:?}", how);
    }

    fn main() {
        f(How::ThatWay);
    }

5 years agoMerge #3432
bors[bot] [Mon, 19 Nov 2018 21:07:49 +0000 (21:07 +0000)]
Merge #3432

3432: match_ref_pats: don't emit suggestions inside of a macro r=Manishearth a=flip1995

Fixes #2636

Co-authored-by: flip1995 <hello@philkrones.com>
5 years agoMerge #3435
bors[bot] [Sat, 17 Nov 2018 15:24:10 +0000 (15:24 +0000)]
Merge #3435

3435: remove unused allow() attributes, NFC r=flip1995 a=matthiaskrgr

Co-authored-by: Matthias Krüger <matthias.krueger@famsik.de>
5 years agoremove unused allow() attributes, NFC
Matthias Krüger [Sat, 17 Nov 2018 12:47:27 +0000 (13:47 +0100)]
remove unused allow() attributes, NFC

5 years agoMerge #3431
bors[bot] [Thu, 15 Nov 2018 16:10:48 +0000 (16:10 +0000)]
Merge #3431

3431: rustup https://github.com/rust-lang/rust/pull/55852/ r=flip1995 a=matthiaskrgr

Co-authored-by: Matthias Krüger <matthias.krueger@famsik.de>
5 years agoAdd regression test
flip1995 [Thu, 15 Nov 2018 16:03:41 +0000 (17:03 +0100)]
Add regression test

5 years agoDon't emit suggestion when inside of a macro
flip1995 [Thu, 15 Nov 2018 16:03:17 +0000 (17:03 +0100)]
Don't emit suggestion when inside of a macro

5 years agorustup https://github.com/rust-lang/rust/pull/55852/
Matthias Krüger [Thu, 15 Nov 2018 15:50:28 +0000 (16:50 +0100)]
rustup https://github.com/rust-lang/rust/pull/55852/

5 years agoMerge #3419
bors[bot] [Thu, 15 Nov 2018 14:18:12 +0000 (14:18 +0000)]
Merge #3419

3419: Linter to check that all common metadata is included r=flip1995 a=ysimonson

Addresses https://github.com/rust-lang-nursery/rust-clippy/issues/1793

This is not ready to be merged yet. First the associated changes to `cargo_metadata` need to be merged: https://github.com/oli-obk/cargo_metadata/pull/55

Co-authored-by: Yusuf Simonson <simonson@gmail.com>
5 years agoMerge #3428
bors[bot] [Wed, 14 Nov 2018 13:24:45 +0000 (13:24 +0000)]
Merge #3428

3428: Typo "too" -> "foo" in format.rs r=matthiaskrgr a=ama0

Co-authored-by: Anton <ama0@users.noreply.github.com>
5 years agoFix "too" -> "foo" typo in format.rs
Anton [Wed, 14 Nov 2018 13:08:52 +0000 (14:08 +0100)]
Fix "too" -> "foo" typo in format.rs

5 years agoMerge #3427
bors[bot] [Wed, 14 Nov 2018 08:57:32 +0000 (08:57 +0000)]
Merge #3427

3427: Fix wrong suggestion for `redundant_closure_call` r=oli-obk a=mikerite

Fixes #1684

Co-authored-by: Michael Wright <mikerite@lavabit.com>
5 years agoFix `use_self` violation
Michael Wright [Wed, 14 Nov 2018 06:43:35 +0000 (08:43 +0200)]
Fix `use_self` violation

5 years agoFix wrong suggestion for `redundant_closure_call`
Michael Wright [Wed, 14 Nov 2018 06:01:39 +0000 (08:01 +0200)]
Fix wrong suggestion for `redundant_closure_call`

Fixes #1684

5 years agoCheck for common metadata
Yusuf Simonson [Tue, 13 Nov 2018 13:43:30 +0000 (08:43 -0500)]
Check for common metadata

5 years agoMerge #3426
bors[bot] [Tue, 13 Nov 2018 12:57:20 +0000 (12:57 +0000)]
Merge #3426

3426: Fix `use_self` false positive on `use` statements r=flip1995 a=mikerite

Fixes #3425

Co-authored-by: Michael Wright <mikerite@lavabit.com>
5 years agoFix `use_self` false positive on `use` statements
Michael Wright [Tue, 13 Nov 2018 04:15:33 +0000 (06:15 +0200)]
Fix `use_self` false positive on `use` statements

5 years agoMerge #3423
bors[bot] [Sat, 10 Nov 2018 13:16:35 +0000 (13:16 +0000)]
Merge #3423

3423: Fix `use_self` false positive r=flip1995 a=mikerite

This fixes the first error reported in issue #3410.

Co-authored-by: Michael Wright <mikerite@lavabit.com>
5 years agoFix `use_self` false positive
Michael Wright [Sat, 10 Nov 2018 08:46:21 +0000 (10:46 +0200)]
Fix `use_self` false positive

This fixes the first error reported in issue #3410.

5 years agoMerge #3407
bors[bot] [Wed, 7 Nov 2018 07:16:43 +0000 (07:16 +0000)]
Merge #3407

3407: Fix `possible_missing_comma` false positives r=oli-obk a=mikerite

`possible_missing_comma` should only trigger when the binary operator has
unary equivalent. Otherwise, it's not possible to insert a comma without
breaking compilation. The operators identified were `+`, `&`, `*` and `-`.

This fixes the specific examples given in issues #3244 and #3396
but doesn't address the conflict this lint has with the style of starting
a line with a binary operator.

Co-authored-by: Michael Wright <mikerite@lavabit.com>
5 years agoRemove `+` from `has_unary_equivalent`
Michael Wright [Tue, 6 Nov 2018 05:05:13 +0000 (07:05 +0200)]
Remove `+` from `has_unary_equivalent`

Rust doesn't has a unary + operator!

5 years agoMerge branch 'master' into fix-missing-comma-fp
Michael Wright [Tue, 6 Nov 2018 05:00:54 +0000 (07:00 +0200)]
Merge branch 'master' into fix-missing-comma-fp

5 years agoMerge #3408
bors[bot] [Mon, 5 Nov 2018 09:02:11 +0000 (09:02 +0000)]
Merge #3408

3408: RIIR update lints: Add check mode (update_lints.py rewrite complete) r=oli-obk a=phansch

This finishes up the rewrite of `update_lints.py` in Rust. More
specifically, this

* adds the `--check` flag and handling to clippy_dev
* tracks file changes over the different calls to `replace_region_in_file`
* only writes changes to files if the `--check` flag is *not* used
* runs `./util/dev update_lints --check` on CI instead of the old script
* replaces usage of the `update_lints.py` script with an error

`./util/dev update_lints` behaves 99% the same as the python script.
The only difference that I'm aware of is an ordering change to
`clippy_lints/src/lib.rs` because underscores seem to be sorted
differently in Rust and in Python.

:checkered_flag:

cc #2882

Co-authored-by: Philipp Hansch <dev@phansch.net>
Co-authored-by: Philipp Krones <hello@philkrones.com>
5 years agoFix dogfood
Philipp Hansch [Mon, 5 Nov 2018 06:11:25 +0000 (07:11 +0100)]
Fix dogfood

5 years agoUpdate println! formatting
Philipp Krones [Sun, 4 Nov 2018 21:08:18 +0000 (22:08 +0100)]
Update println! formatting

Co-Authored-By: phansch <dev@phansch.net>
5 years agoFix false positive in check mode caused by `gen_deprecated`
Philipp Hansch [Sun, 4 Nov 2018 21:05:12 +0000 (22:05 +0100)]
Fix false positive in check mode caused by `gen_deprecated`

`gen_deprecated` should never have created the string with linebreaks.

Using a single string broke the check because the changed lines were
different.

5 years agoRIIR update lints: Add check mode (update_lints.py rewrite complete)
Philipp Hansch [Sun, 4 Nov 2018 08:41:28 +0000 (09:41 +0100)]
RIIR update lints: Add check mode (update_lints.py rewrite complete)

This finishes up the rewrite of `update_lints.py` in Rust. More
specifically, this

* adds the `--check` flag and handling to clippy_dev
* tracks file changes over the different calls to `replace_region_in_file`
* only writes changes to files if the `--check` flag is *not* used
* runs `./util/dev update_lints --check` on CI instead of the old script
* replaces usage of the `update_lints.py` script with an error

`./util/dev update_lints` behaves 99% the same as the python script.
The only difference that I'm aware of is an ordering change to
`clippy_lints/src/lib.rs` because underscores seem to be sorted
differently in Rust and in Python.

:checkered_flag:

5 years agoMerge #3353
bors[bot] [Mon, 5 Nov 2018 03:58:15 +0000 (03:58 +0000)]
Merge #3353

3353: float support added for mistyped_literal_suffixes lint r=mikerite a=Maxgy

I implemented the mistyped_literal_suffixes lint for float literals.

```
#![allow(unused_variables)]

fn main() {
    let x = 1E2_32;
    let x = 75.22_64;
}
```
Given the above, the additional check suggests the variables to be written as `let x = 1E2_f32` and `let x = 75.22_f64`.

Fixes #3167

Co-authored-by: Maxwell Anderson <maxwell.brayden.anderson@gmail.com>
5 years agoMerge #3411
bors[bot] [Sun, 4 Nov 2018 22:22:03 +0000 (22:22 +0000)]
Merge #3411

3411: rustup https://github.com/rust-lang/rust/pull/55665 (pass contexts by reference) r=matthiaskrgr a=matthiaskrgr

Co-authored-by: Matthias Krüger <matthias.krueger@famsik.de>
5 years agorustup https://github.com/rust-lang/rust/pull/55665 (pass contexts by reference)
Matthias Krüger [Sun, 4 Nov 2018 21:47:20 +0000 (22:47 +0100)]
rustup https://github.com/rust-lang/rust/pull/55665 (pass contexts by reference)

5 years agochanged into_iter to iter and fixed a lint check
Maxwell Anderson [Sun, 4 Nov 2018 17:39:54 +0000 (10:39 -0700)]
changed into_iter to iter and fixed a lint check

5 years agoFix `collapsible_if` error
Michael Wright [Sun, 4 Nov 2018 08:48:24 +0000 (10:48 +0200)]
Fix `collapsible_if` error

5 years agoFix `possible_missing_comma` false positives
Michael Wright [Sun, 4 Nov 2018 08:02:49 +0000 (10:02 +0200)]
Fix `possible_missing_comma` false positives

`possible_missing_comma` should only trigger when the binary operator has
unary equivalent. Otherwise, it's not possible to insert a comma without
breaking compilation. The operators identified were `+`, `&`, `*` and `-`.

This fixes the specific examples given in issues #3244 and #3396
but doesn't address the conflict this lint has with the style of starting
a line with a binary operator.

5 years agoMerge #3399
bors[bot] [Sat, 3 Nov 2018 19:11:35 +0000 (19:11 +0000)]
Merge #3399

3399: RIIR update lints: Generate modules section and lint group sections r=flip1995 a=phansch

This adds the last missing parts of the generating code.

cc #2882

Co-authored-by: Philipp Hansch <dev@phansch.net>
5 years agoMerge pull request #3404 from matthiaskrgr/rustup
Philipp Hansch [Sat, 3 Nov 2018 19:06:48 +0000 (20:06 +0100)]
Merge pull request #3404 from matthiaskrgr/rustup

rustup https://github.com/rust-lang/rust/pull/55330/