Commit Graph

7378 Commits

Author SHA1 Message Date
flip1995
cadc35af5a
Rustup to rust-lang/rust#66389 2019-11-22 13:47:33 +01:00
flip1995
e4636f3c39
Rustup to rust-lang/rust#66515
Fixes #4835
2019-11-22 13:47:33 +01:00
flip1995
3c308b86c8
Remove never_type feature
Stablized in rust-lang/rust#65355
2019-11-22 13:47:33 +01:00
Igor Aleksanov
bbb8cd4fbb Implement if_same_cond_fn lint
Run ./util/dev

Revert changelog entry

Rename lint to same_functions_in_if_condition and add a doc example

Add testcases with different arg in fn invocation
2019-11-20 06:54:46 +03:00
Johannes Schilling
c6e6b292bd add a good example for the approx_const lint 2019-11-19 20:14:09 +01:00
Johannes Schilling
c58a5c6272 Add suggested good cases in docs for lifetimes lint 2019-11-19 20:03:41 +01:00
lzutao
d229d91d88
use usize::from
Co-Authored-By: Mateusz Mikuła <mati865@users.noreply.github.com>
2019-11-19 23:47:18 +07:00
Lzu Tao
4da0da9281 use more efficient code to generate repeated string
see https://rust.godbolt.org/z/z9vrFP for comparison
2019-11-19 23:08:50 +07:00
Manish Goregaokar
d183bda0be Rustup to rustc 1.41.0-nightly (d1da8023d 2019-11-19) 2019-11-19 00:32:35 -08:00
Manish Goregaokar
aa5a95f00c Rustup to rustc 1.41.0-nightly (a0d40f8bd 2019-11-18) 2019-11-18 23:49:58 -08:00
Andre Bogus
c21b198576 New lint: zst_offset 2019-11-15 22:39:27 +01:00
Guanqun Lu
f2d8197110 doc: fix the comment above the lint function 2019-11-16 01:55:06 +08:00
Florian Rohm
73806b72a9 register new lint "tabs in doc comments" and update readme 2019-11-15 16:26:30 +01:00
Florian Rohm
f8f7800b18 add new lint tabs in doc comments 2019-11-15 16:25:47 +01:00
bors
b4f1769734 Auto merge of #4815 - JohnTitor:rustup, r=matthiaskrgr
Rustup rust-lang/rust#66233

changelog: none
2019-11-14 10:00:18 +00:00
Yuki Okushi
0736dd9dfe Rustup rust-lang/rust#66233 2019-11-14 17:44:23 +09:00
Michael Wright
ceb0b2d41a literal repr: ignore more warnings in macros 2019-11-14 08:19:02 +02:00
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