]>
git.lizzy.rs Git - rust.git/log
Philipp Hansch [Sun, 2 Dec 2018 13:33:19 +0000 (14:33 +0100)]
Travis: Add rustc sysroot bin to PATH for windows build
Philipp Hansch [Sun, 2 Dec 2018 10:37:05 +0000 (11:37 +0100)]
Merge pull request #3484 from phansch/fix_windows_lineendings
git: Enforce LF lineendings for everything
Philipp Hansch [Sun, 2 Dec 2018 09:57:56 +0000 (10:57 +0100)]
Enforce LF lineendings for everything
Someone on discord reported issues with UI tests.
This should make sure that git never automatically converts lineendings
for text files to `CRLF`. They should always be `LF` now.
Probably this means that we can stop using dos2unix for #3306, too.
Taken from [Rust's .gitattributes file](https://github.com/rust-lang/rust/blob/master/.gitattributes).
Philipp Hansch [Fri, 30 Nov 2018 09:20:24 +0000 (10:20 +0100)]
Merge pull request #3471 from matthiaskrgr/mamor_warn
remove macro_at_most_once_rep feature attribute since it's stable
Matthias Krüger [Fri, 30 Nov 2018 08:14:18 +0000 (09:14 +0100)]
remove macro_at_most_once_rep feature attribute since it's stable
Warning was:
warning: the feature `macro_at_most_once_rep` has been stable since 1.32.0 and no longer requires an attribute to enable
--> clippy_lints/src/lib.rs:19:12
|
19 | #![feature(macro_at_most_once_rep)]
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(stable_features)] on by default
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
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
Philipp Krones [Wed, 28 Nov 2018 13:39:25 +0000 (14:39 +0100)]
Add missing word
Co-Authored-By: phansch <dev@phansch.net>
Philipp Hansch [Wed, 28 Nov 2018 07:11:28 +0000 (08:11 +0100)]
Update docs in regards to the merged RFC
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
flip1995 [Tue, 27 Nov 2018 21:36:25 +0000 (22:36 +0100)]
Document how to run rustfmt in CONTRIBUTING.md
flip1995 [Tue, 27 Nov 2018 21:01:22 +0000 (22:01 +0100)]
Don't run integration tests in forks
flip1995 [Tue, 27 Nov 2018 20:49:09 +0000 (21:49 +0100)]
Fix some formatting issues
flip1995 [Tue, 27 Nov 2018 20:14:15 +0000 (21:14 +0100)]
Run rustfmt on clippy_lints
flip1995 [Tue, 27 Nov 2018 20:13:26 +0000 (21:13 +0100)]
Run rustfmt on build.rs
flip1995 [Tue, 27 Nov 2018 20:13:08 +0000 (21:13 +0100)]
Run rustfmt on clippy_dev
flip1995 [Tue, 27 Nov 2018 20:12:38 +0000 (21:12 +0100)]
Run rustfmt on rustc_tools_util
flip1995 [Tue, 27 Nov 2018 20:12:13 +0000 (21:12 +0100)]
Run rustfmt on src
flip1995 [Tue, 27 Nov 2018 20:11:50 +0000 (21:11 +0100)]
Run rustfmt on the tests
flip1995 [Tue, 27 Nov 2018 20:11:05 +0000 (21:11 +0100)]
Let travis run cargo fmt --all -- --check
flip1995 [Tue, 27 Nov 2018 19:46:11 +0000 (20:46 +0100)]
Error on line overflow
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
flip1995 [Tue, 27 Nov 2018 16:31:17 +0000 (17:31 +0100)]
Fix NAIVE_BYTECOUNT applicability
flip1995 [Tue, 27 Nov 2018 15:59:52 +0000 (16:59 +0100)]
Fix dogfood error
flip1995 [Tue, 27 Nov 2018 15:59:39 +0000 (16:59 +0100)]
Change Applicability of MISTYPED_LITERAL_SUFFIX
flip1995 [Tue, 27 Nov 2018 14:13:57 +0000 (15:13 +0100)]
Add applicability level to (nearly) every span_lint_and_sugg function
flip1995 [Tue, 27 Nov 2018 14:27:34 +0000 (15:27 +0100)]
Update stderr file
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.
flip1995 [Tue, 20 Nov 2018 13:06:29 +0000 (14:06 +0100)]
Add Applicability::Unspecified to span_lint_and_sugg functions
flip1995 [Tue, 20 Nov 2018 09:33:40 +0000 (10:33 +0100)]
Introduce snippet_with_applicability and hir_with_applicability functions
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.
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.
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
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
Matthias Krüger [Mon, 26 Nov 2018 00:12:12 +0000 (01:12 +0100)]
constants: add u128 i128 builtin types and fix outdated url
Guillem Nieto [Sun, 25 Nov 2018 22:36:04 +0000 (14:36 -0800)]
Update lints
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.
Guillem Nieto [Mon, 5 Nov 2018 21:46:07 +0000 (22:46 +0100)]
Fix some warnings related to Self
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.
Guillem Nieto [Mon, 29 Oct 2018 23:25:05 +0000 (00:25 +0100)]
Split lint into slow and unsafe vector initalization
Guillem Nieto [Fri, 26 Oct 2018 20:35:16 +0000 (22:35 +0200)]
Add unsafe set_len initialization
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]`.
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
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`
Philipp Hansch [Fri, 23 Nov 2018 20:47:02 +0000 (21:47 +0100)]
Travis: Remove `sudo: false`
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/
Matthias Krüger [Fri, 23 Nov 2018 09:05:51 +0000 (10:05 +0100)]
rustup https://github.com/rust-lang/rust/pull/54071/
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
Matthias Krüger [Thu, 22 Nov 2018 17:04:34 +0000 (18:04 +0100)]
dependencies: update pulldown-cmark from 0.1 to 0.2
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
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
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
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)
Philipp Hansch [Thu, 22 Nov 2018 06:53:59 +0000 (07:53 +0100)]
s/file_map/source_map
Matthias Krüger [Thu, 22 Nov 2018 03:50:00 +0000 (04:50 +0100)]
missed another one in the README
Matthias Krüger [Thu, 22 Nov 2018 03:43:33 +0000 (04:43 +0100)]
run "util/dev update_lints"
Matthias Krüger [Thu, 22 Nov 2018 03:40:09 +0000 (04:40 +0100)]
rust-lang-nursery/rust-clippy => rust-lang/rust-clippy
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>
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>
Wayne Warren [Wed, 21 Nov 2018 12:05:52 +0000 (06:05 -0600)]
Address 'clippy::single-match' dogfood lint
Philipp Krones [Wed, 21 Nov 2018 12:08:33 +0000 (06:08 -0600)]
Fix nit
Co-Authored-By: waynr <wayne.warren.s@gmail.com>
Wayne Warren [Wed, 21 Nov 2018 03:21:07 +0000 (21:21 -0600)]
Address travis CI lint failure
Wayne Warren [Wed, 21 Nov 2018 01:59:02 +0000 (19:59 -0600)]
Update trivially_copy_pass_by_ref with Trait stderr output
Wayne Warren [Wed, 21 Nov 2018 00:49:15 +0000 (18:49 -0600)]
issue#3318 run trivially_copy_pass_by_ref for traits
Wayne Warren [Wed, 21 Nov 2018 01:57:53 +0000 (19:57 -0600)]
Update trivially_copy_pass_by_ref with Trait examples
Wayne Warren [Wed, 21 Nov 2018 13:16:03 +0000 (07:16 -0600)]
Fix awkward wording
Wayne Warren [Wed, 21 Nov 2018 13:12:00 +0000 (07:12 -0600)]
Document how to lint local Clippy changes with locally built Clippy
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>
Oliver Scherer [Wed, 21 Nov 2018 12:33:42 +0000 (13:33 +0100)]
Enable rustup clippy to refer to the correct documentation
Matthias Krüger [Wed, 21 Nov 2018 12:29:23 +0000 (13:29 +0100)]
rustup https://github.com/rust-lang/rust/pull/52591
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);
}
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>
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>
Matthias Krüger [Sat, 17 Nov 2018 12:47:27 +0000 (13:47 +0100)]
remove unused allow() attributes, NFC
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>
flip1995 [Thu, 15 Nov 2018 16:03:41 +0000 (17:03 +0100)]
Add regression test
flip1995 [Thu, 15 Nov 2018 16:03:17 +0000 (17:03 +0100)]
Don't emit suggestion when inside of a macro
Matthias Krüger [Thu, 15 Nov 2018 15:50:28 +0000 (16:50 +0100)]
rustup https://github.com/rust-lang/rust/pull/55852/
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>
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>
Anton [Wed, 14 Nov 2018 13:08:52 +0000 (14:08 +0100)]
Fix "too" -> "foo" typo in format.rs
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>
Michael Wright [Wed, 14 Nov 2018 06:43:35 +0000 (08:43 +0200)]
Fix `use_self` violation
Michael Wright [Wed, 14 Nov 2018 06:01:39 +0000 (08:01 +0200)]
Fix wrong suggestion for `redundant_closure_call`
Fixes #1684
Yusuf Simonson [Tue, 13 Nov 2018 13:43:30 +0000 (08:43 -0500)]
Check for common metadata
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>
Michael Wright [Tue, 13 Nov 2018 04:15:33 +0000 (06:15 +0200)]
Fix `use_self` false positive on `use` statements
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>
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.
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>
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!
Michael Wright [Tue, 6 Nov 2018 05:00:54 +0000 (07:00 +0200)]
Merge branch 'master' into fix-missing-comma-fp
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>
Philipp Hansch [Mon, 5 Nov 2018 06:11:25 +0000 (07:11 +0100)]
Fix dogfood
Philipp Krones [Sun, 4 Nov 2018 21:08:18 +0000 (22:08 +0100)]
Update println! formatting
Co-Authored-By: phansch <dev@phansch.net>
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.
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:
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>
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>
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)