flip1995
6c27482115
Merge commit '3ae8faff4d46ad92f194c2a4b941c3152a701b31' into clippyup
2021-06-03 08:41:37 +02:00
flip1995
f6d1f368db
Merge commit 'b40ea209e7f14c8193ddfc98143967b6a2f4f5c9' into clippyup
2021-04-08 17:50:13 +02:00
Josh Stone
0dddfbf9bf
Use iter::zip in src/tools/clippy/
2021-03-26 09:33:38 -07:00
flip1995
9f6b5de7de
Merge commit '0e87918536b9833bbc6c683d1f9d51ee2bf03ef1' into clippyup
2021-03-25 19:29:11 +01:00
flip1995
8eca423ea1
Merge commit 'c1664c50b27a51f7a78c93ba65558e7c33eabee6' into clippyup
2020-12-06 15:01:03 +01:00
Eduardo Broto
50419118b4
Merge commit '645ef505da378b6f810b1567806d1bcc2856395f' into clippyup
2020-10-28 23:36:07 +01:00
flip1995
fbf2430f02
Merge commit '2f6439ae6a6803d030cceb3ee14c9150e91b328b' into clippyup
2020-10-09 12:45:29 +02:00
flip1995
6f25adbd5a
Merge commit '2ca58e7dda4a9eb142599638c59dc04d15961175' into clippyup
2020-07-14 14:59:59 +02:00
Lzu Tao
8db24840f7
Merge commit 'ff0993c5e9162ddaea78e83d0f0161e68bd4ea73' into clippy
2020-06-09 14:36:01 +00:00
Dan B
a296058e50
Allow UUID style formatting for inconsistent_digit_grouping
lint
...
This change adds a check to the `inconsistent_digit_grouping` to add a check for
NumericLiterals that follow the UUID format of 8-4-4-4-12.
If the NumericLiteral matches the UUID format, no further inconsistent grouping checks
will be performed.
Closes #5431
2020-04-12 01:24:37 +01:00
David Tolnay
be34bc46ed
Downgrade unreadable_literal to pedantic
2020-04-04 12:52:03 -07:00
Matthias Krüger
aff57e0f43
rustup https://github.com/rust-lang/rust/pull/70536
2020-03-30 11:17:58 +02:00
mlegner
d14fdc0203
Move NumericLiteral to its own module.
2020-03-04 13:22:53 +01:00
mlegner
73deb723dd
Included binary and octal cases.
2020-03-04 13:21:01 +01:00
mlegner
6673cc8329
Resolve false positives for hex int cast.
2020-03-04 13:21:00 +01:00
Yuki Okushi
4253aa7137
Rustup to rust-lang/rust#69592
2020-03-01 12:23:33 +09:00
flip1995
8472ecda0f
Fix fallout
2020-02-21 11:14:18 +01:00
bors
779b6aeaa6
Auto merge of #4809 - iankronquist:patch-1, r=flip1995
...
Typo in literal_representation.rs
Octal numbers can't have 8 in them ;)
changelog: none
2020-02-15 15:12:14 +00:00
Yuki Okushi
ce1c6b285d
Rustup to rust-lang/rust#68045
2020-01-13 21:55:57 +09:00
Yuki Okushi
39947992b5
Rustup to rust-lang/rust#67806
2020-01-11 21:50:00 +09:00
Yuki Okushi
9086b17e14
Rustup to rust-lang/rust#67707
2019-12-31 09:17:56 +09:00
Yuki Okushi
b68e65b4da
Do not drop suffixes on decimal_literal_representation
2019-12-26 01:22:36 +09:00
Lzu Tao
f5b896451a
do minor cleanups
...
* ToString and AsRef are in prelude, no need to import them
2019-12-24 03:06:52 +07:00
Matthias Krüger
98e433d70d
Rustup to rust-lang/rust#66878
2019-12-04 01:34:01 +01:00
Ian Kronquist
aef2662896
Update literal_representation.rs
2019-11-25 16:30:46 -08:00
Ian Kronquist
b13f4e4faf
Update literal_representation.rs
2019-11-25 16:28:46 -08: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
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
Ian Kronquist
5c31efd429
Typo in literal_representation.rs
...
Octal numbers can't have 8 in them ;)
2019-11-12 16:02:02 -08:00
Michael Wright
a9b5b36769
Fix to_digit_is_some
dogfood errors
2019-11-10 15:53:08 +02:00
bors
426c05ae33
Auto merge of #4758 - mikerite:dec_lit_20191031, r=flip1995
...
`DecimalLiteralRepresentation` simplification
Remove recalculation of literal value.
changelog: none
2019-11-07 21:06:18 +00:00
flip1995
e917b01286
Rustup to rust-lang/rust#65884
2019-11-07 13:27:00 +01:00
Michael Wright
4e78547e6f
DecimalLiteralRepresentation
simplification
...
Remove recalculation of literal value.
2019-10-31 09:13:08 +02:00
James Wang
664522badd
Add a new lint for unused self
2019-10-15 09:58:11 +02:00
Andre Bogus
cc622608db
new lints around #[must_use]
fns
...
`must_use_unit` lints unit-returning functions with a `#[must_use]`
attribute, suggesting to remove it.
`double_must_use` lints functions with a plain `#[must_use]`
attribute, but which return a type which is already `#[must_use]`,
so the attribute has no benefit.
`must_use_candidate` is a pedantic lint that lints functions and
methods that return some non-unit type that is not already
`#[must_use]` and suggests to add the annotation.
2019-10-14 12:09:04 +02:00
Matthias Seiffert
e333ed0d53
Correctly align doc of mistyped literal suffixes
2019-10-03 22:14:32 +02:00
flip1995
4bbd10a585
Rustup to rust-lang/rust#64813
2019-09-27 17:21:20 +02:00
Jakub Wieczorek
2a13e83f2b
Update all the code to pass the updated use_self
lint.
...
One struct required a temporary `#[allow(dead_code)]` annotation due to
a bug in the Rust compiler: https://github.com/rust-lang/rust/issues/63151 .
2019-07-31 08:50:43 +00:00