]> git.lizzy.rs Git - rust.git/log
rust.git
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/

5 years agorustup https://github.com/rust-lang/rust/pull/55330/
Matthias Krüger [Sat, 3 Nov 2018 17:50:23 +0000 (18:50 +0100)]
rustup https://github.com/rust-lang/rust/pull/55330/

5 years agoFix typo
Philipp Hansch [Sat, 3 Nov 2018 17:48:39 +0000 (18:48 +0100)]
Fix typo

5 years agoImprove clippy_dev help text
Philipp Hansch [Sat, 3 Nov 2018 11:59:40 +0000 (12:59 +0100)]
Improve clippy_dev help text

5 years agoRIIR update lints: Generate lint group registrations
Philipp Hansch [Sat, 3 Nov 2018 11:59:13 +0000 (12:59 +0100)]
RIIR update lints: Generate lint group registrations

5 years agoTest clippy_dev on CI and fix test
Philipp Hansch [Sat, 3 Nov 2018 09:58:45 +0000 (10:58 +0100)]
Test clippy_dev on CI and fix test

5 years agoMerge #3400
bors[bot] [Sat, 3 Nov 2018 08:34:13 +0000 (08:34 +0000)]
Merge #3400

3400: Fix a false-positive of needless_borrow r=phansch a=sinkuu

Co-authored-by: Shotaro Yamada <sinkuu@sinkuu.xyz>
5 years agoMerge #3123
bors[bot] [Sat, 3 Nov 2018 08:12:10 +0000 (08:12 +0000)]
Merge #3123

3123: Lint #[cfg_attr(rustfmt, rustfmt_skip)] and suggest #[rustfmt::skip] r=phansch a=flip1995

Closes #3121

Co-authored-by: flip1995 <9744647+flip1995@users.noreply.github.com>
Co-authored-by: flip1995 <hello@philkrones.com>
5 years agoRIIR update lints: Generate modules section
Philipp Hansch [Thu, 1 Nov 2018 19:16:38 +0000 (20:16 +0100)]
RIIR update lints: Generate modules section

5 years agoUpdate stderr
flip1995 [Fri, 2 Nov 2018 12:43:16 +0000 (13:43 +0100)]
Update stderr

5 years agoRename test files
flip1995 [Thu, 1 Nov 2018 19:17:04 +0000 (20:17 +0100)]
Rename test files

5 years agoAlso lint cfg_attr(.., rustfmt::skip)
flip1995 [Thu, 1 Nov 2018 19:06:59 +0000 (20:06 +0100)]
Also lint cfg_attr(.., rustfmt::skip)

5 years agoAdd tests from rustfmt::skip test file
flip1995 [Thu, 1 Nov 2018 19:06:25 +0000 (20:06 +0100)]
Add tests from rustfmt::skip test file

5 years agoRun update_lints.py script
flip1995 [Mon, 15 Oct 2018 13:18:26 +0000 (15:18 +0200)]
Run update_lints.py script

5 years agoAdd test for non-crate-level inner attributes
flip1995 [Tue, 18 Sep 2018 09:36:59 +0000 (11:36 +0200)]
Add test for non-crate-level inner attributes

5 years agoDiffer between inner and outer attributes
flip1995 [Tue, 18 Sep 2018 09:35:53 +0000 (11:35 +0200)]
Differ between inner and outer attributes

5 years agoAdd tests
flip1995 [Mon, 3 Sep 2018 13:34:33 +0000 (15:34 +0200)]
Add tests

5 years agoAdd cfg_attr(rustfmt) lint
flip1995 [Mon, 3 Sep 2018 13:34:12 +0000 (15:34 +0200)]
Add cfg_attr(rustfmt) lint

5 years agoMerge #3344
bors[bot] [Fri, 2 Nov 2018 15:08:38 +0000 (15:08 +0000)]
Merge #3344

3344: Added lints `into_iter_on_ref` and `into_iter_on_array`. r=phansch a=kennytm

Fixes #1565.

`into_iter_on_array` is a correctness lint against `into_iter()` on `[T; n]` and `PathBuf` (please provide a concise noun that covers both types 🙃).

`into_iter_on_ref` is a style lint against `into_iter()` on `&C` where `C` is `[T]`, `Vec<T>`, `BTreeSet<T>` etc.

Both suggests replacing the `into_iter()` with `iter()` or `iter_mut()`.

`into_iter_on_array` is a correctness lint since it is very likely the standard library would provide an `into_iter()` method for `[T; n]` (rust-lang/rust#25725) and existing type inference of `[a, b, c].into_iter()` will be broken. `PathBuf` is also placed under this lint since `PathBuf::into_iter` currently doesn't exist and it makes some sense to implement `IntoIterator` on it yielding `OsString`s.

Co-authored-by: kennytm <kennytm@gmail.com>
5 years agoAddressed comments.
kennytm [Tue, 23 Oct 2018 17:50:18 +0000 (01:50 +0800)]
Addressed comments.

5 years agoFix dogfood error.
kennytm [Mon, 22 Oct 2018 03:44:09 +0000 (11:44 +0800)]
Fix dogfood error.

5 years agoAdded lints `into_iter_on_ref` and `into_iter_on_array`. Fix #1565.
kennytm [Sat, 20 Oct 2018 20:03:38 +0000 (04:03 +0800)]
Added lints `into_iter_on_ref` and `into_iter_on_array`. Fix #1565.

5 years agoMerge #3161
bors[bot] [Fri, 2 Nov 2018 13:17:59 +0000 (13:17 +0000)]
Merge #3161

3161: New lint: Unknown clippy lints r=phansch a=flip1995

This is the Clippy version of the `rustc` lint `unknown_lints`. The behavior of this lint is pretty much the same.

Before this is merged a small change in the compiler needs to be done: `CheckLintNameResult` needs to be public. See rust-lang/rust#54106

Co-authored-by: flip1995 <9744647+flip1995@users.noreply.github.com>
Co-authored-by: flip1995 <hello@philkrones.com>
5 years agoAllow single_match_else
flip1995 [Fri, 2 Nov 2018 13:00:46 +0000 (14:00 +0100)]
Allow single_match_else

5 years agoUpdate stderr
flip1995 [Fri, 2 Nov 2018 11:58:16 +0000 (12:58 +0100)]
Update stderr