Michael Wright
75e2dcf56b
literal representation: simplification
...
Simplify calculation in grouping. Add test case to ensure `count()`
can't be zero in that branch.
2019-11-14 07:42:04 +02:00
Areredify
7fddac0404
Add new lint: large stack array
...
added documentation
minor style fix
change as to ::from
add ignore to doc
include threshold in lint message/make suggestion more apparent/use Scalar api instead of matching
style fix
shange snippet_opt to snippet
2019-11-13 21:44:29 +03:00
bors
0574d6612c
Auto merge of #4810 - Areredify:4716-fix, r=flip1995
...
clippy-driver display help on empty command line arguments
changelog: fixes #4716 , now displaying help if clippy-driver is run with no arguments.
2019-11-13 18:07:23 +00:00
bors
320b94d209
Auto merge of #4794 - rust-lang:no-must-use-impls, r=flip1995
...
no more must-use-candidate impls
This should help with #4779 .
changelog: don't trigger [`must_use_candidate`] on trait impls
2019-11-13 13:13:14 +00:00
Michael Wright
2e9d173be1
literal representation restructure 12
...
Export function for formatting literals and remove crate visibility from
other items.
2019-11-13 08:28:50 +02:00
Michael Wright
eb9caf3050
literal representation restructure 11
...
Rename `grouping_hint` to `format` and use the term consistently.
2019-11-13 08:28:06 +02:00
Michael Wright
a8ca8a21c1
literal representation restructure 10
...
Rename DigitInfo to NumericLiteral
2019-11-13 08:28:01 +02:00
Michael Wright
a9c5a599e3
literal representation restructure 9
...
Only store valid suffixes (and not mistyped suffixes) in DigitInfo.
Check for mistyped suffixes later and not when DigitInfo is created.
This opens the door to more sophisticated mistyped suffix checks later.
2019-11-13 08:27:54 +02:00
Michael Wright
a58b980bd8
literal representation restructure 8
...
Store the digit parts directly in DigitInfo since we need them anyway.
2019-11-13 08:27:49 +02:00
Michael Wright
b62543f756
literal representation restructure 7
...
Replace `do_lint` with `get_group_size`. Return `None` if there are no
groups.
2019-11-13 08:27:42 +02:00
Michael Wright
abf62d8011
literal representation restructure 6
...
Add `group_digits` helper function.
2019-11-13 08:27:37 +02:00
Michael Wright
ec664e84bf
literal representation restructure 5
...
Use `split_digit_parts` in `check_lit`.
2019-11-13 08:27:27 +02:00
Michael Wright
2d244d3358
literal representation restructure 4
...
Simplify `grouping_hint` by splitting digits into parts and handling
one at a time.
Fixes #4762
2019-11-13 08:27:19 +02:00
Michael Wright
2e8946a6de
literal representation restructure 3
...
Move suffix check into `check_lit` so that it isn't done repeatedly.
2019-11-13 08:27:14 +02:00
Michael Wright
2dbd34ffe8
literal representation restructure 2
...
Consolidate warning handling using "poor man's try".
2019-11-13 08:27:05 +02:00
Michael Wright
8f5b4f3f5c
literal representation restructure 1
...
Combine macro expansion checks. Indentation is a little strange to
avoid rustfmt issue.
2019-11-13 08:26:52 +02:00
Mikhail Babenko
227dc44aee
display help on empty command line arguments
2019-11-13 04:27:43 +03:00
Andre Bogus
5f0f67375d
no more must-use-candidate on trait impls
2019-11-12 23:36:22 +01:00
bors
180f87065f
Auto merge of #4769 - euclio:crlf, r=flip1995
...
don't warn on CRLF in `with_newline` lints
changelog: don't warn on CRLF in `print_with_newline` and `write_with_newline`
fixes #4208 .
This PR also transitions the unescaping logic to use the compiler's lexer.
2019-11-12 13:56:14 +00:00
Andy Russell
add766493a
don't warn on CRLF in with_newline
lints
2019-11-12 08:50:22 -05:00
bors
2646b108d5
Auto merge of #4803 - tomprogrammer:issue-4732, r=phansch
...
Fix false positive in explicit_counter_loop lint
When the counter was used in a closure after the loop the lint didn't detect the
usage of the counter correctly.
changelog: Fix false positive in `explicit_counter_loop`
Fixes #4732
2019-11-11 19:24:20 +00:00
bors
86b8643586
Auto merge of #4805 - Manishearth:rustup, r=phansch
...
Rustup to rustc 1.40.0-nightly (56237d75b
2019-11-11)
changelog: none
2019-11-11 18:59:06 +00:00
Manish Goregaokar
e9a3e54910
MutImmutable -> Immutable, MutMutable -> Mutable, CaptureClause -> CaptureBy
2019-11-11 10:58:39 -08:00
bors
79d3b30cd7
Auto merge of #4801 - mikerite:to_digit_is_some, r=flip1995
...
To digit is some
Add a lint that recommends replacing `to_digit().is_some()` with `is_digit()` on `char`s
changelog: Add lint `to_digit_is_some`
2019-11-11 11:28:27 +00:00
Thomas Bahn
c88afce6fc
Fix false positive in explicit_counter_loop lint
...
When the counter was used in a closure after the loop the lint didn't detect the
usage of the counter correctly.
2019-11-11 11:36:53 +01:00
Philipp Hansch
78b7e8544b
Fix false positive in derive_hash_xor_eq
...
This fixes a false positive in derive_hash_xor_eq where the lint was
triggering on user-defined traits called `Hash`.
2019-11-11 07:59:53 +01:00
bors
338f5e6801
Auto merge of #4780 - flip1995:ice_4775, r=phansch
...
Fix ICE #4775
Fixes #4775
changelog: Fix ICE with const_generics
2019-11-11 06:23:27 +00:00
bors
3abdd2f1ce
Auto merge of #4802 - mikerite:fix-breakage-20191111, r=phansch
...
Fix breakage due to rust-lang/rust#65324
changelog: none
2019-11-11 06:03:56 +00:00
Michael Wright
c1fd75005e
Fix breakage due to rust-lang/rust#65324
2019-11-11 06:22:50 +02:00
Michael Wright
89b966cdf1
Really fix to_digit_is_some
documentation
2019-11-10 18:00:04 +02:00
Michael Wright
9aefae4226
Fix to_digit_is_some
documentation
2019-11-10 17:58:17 +02:00
Michael Wright
a9b5b36769
Fix to_digit_is_some
dogfood errors
2019-11-10 15:53:08 +02:00
Michael Wright
5817a4fa06
Add to_digit_is_some
lint
2019-11-10 15:52:59 +02:00
bors
6f9c43ddc5
Auto merge of #4800 - msizanoen1:target-libs2, r=Manishearth
...
Only pass `--extern` flags for rlibs in target deps directory
It seems like there are proc macros/build scripts using serde: https://github.com/rust-lang/rust/pull/66207#issuecomment-552159692
This fix the build error by only passing `--extern` flags for rlibs in target deps directory (if available, otherwise host deps directory).
r? @Manishearth
changelog: none
2019-11-10 04:51:23 +00:00
msizanoen1
805fef0301
Only pass rlibs in target deps directory
2019-11-10 11:14:29 +07:00
bors
2e47cf1b83
Auto merge of #4799 - Manishearth:rustup, r=yaahc
...
Rustup to rustc 1.40.0-nightly (ac162c6ab
2019-11-09)
changelog: none
2019-11-10 01:10:12 +00:00
Manish Goregaokar
3ef852b74c
Rustup to rustc 1.40.0-nightly ( ac162c6ab
2019-11-09)
2019-11-09 17:04:42 -08:00
bors
f3a207e63b
Auto merge of #4791 - lzutao:osx2bors, r=matthiaskrgr
...
build macOS on bors branches only
Clippy is portable enough. It is rare to see Clippy builds' broke
on *nix OSes. Testing macOS build on auto and try branch is
enough.
changelog: none
2019-11-08 23:33:30 +00:00
bors
692b260c34
Auto merge of #4786 - msizanoen1:target-libs, r=Manishearth
...
Add the TARGET_LIBS environment variable for rustc CI testing
Needed to fix the test failure in rust-lang/rust#66158 .
See https://github.com/rust-lang/rust/pull/66158#issuecomment-550585396
r? @Manishearth
changelog: none
2019-11-08 22:58:33 +00:00
bors
b0b3dc6e76
Auto merge of #4776 - mikerite:fix-4727, r=flip1995
...
Fix crash in `use-self` lint
Fixes #4727
changelog: Fix crash in `use-self` lint
2019-11-08 22:06:21 +00:00
bors
37fa1e2ad9
Auto merge of #4795 - HMPerson1:rustup, r=matthiaskrgr
...
Rustup rust-lang/rust#66188
changelog: none
2019-11-08 21:27:26 +00:00
HMPerson1
94b36d9ca4
dogfood
2019-11-08 15:41:54 -05:00
HMPerson1
d4758420e6
Rustup rust-lang/rust#66188
2019-11-08 15:12:08 -05:00
msizanoen1
7d2e813634
Add target libs directory to search path
2019-11-08 12:54:28 +07:00
Michael Wright
cc6e27fa71
Put ice test auxiliary fix in right place
2019-11-08 07:18:12 +02:00
Michael Wright
9c48a2c39a
Merge branch 'master' into fix-4727
2019-11-08 07:15:16 +02:00
bors
4192dbedcb
Auto merge of #4792 - lzutao:rustup-65916, r=Manishearth
...
rustup rust-lang/rust#65916
cc rust-lang/rust#65916
changelog: none
2019-11-08 03:34:42 +00:00
Lzu Tao
ff5bf67b94
remove unused warnings
2019-11-08 10:23:42 +07:00
Lzu Tao
acbe224f6a
rustup https://github.com/rust-lang/rust/pull/65916
2019-11-08 10:23:42 +07:00
bors
4be144af87
Auto merge of #4697 - Licenser:no-exit, r=flip1995
...
restriction lint for `std::process::exit`
Addition to #4655 - adds the lint checking for `std::process::exit`
changelog: add restriction lint for `std::process::exit`
2019-11-07 22:05:51 +00:00