bors
9fd3c2d788
Auto merge of #8543 - dswij:8393, r=giraffate
...
`unnecessary_lazy_eval` show suggestions on multiline lint
Closes #8393
changelog: [`unnecessary_lazy_eval`] now shows suggestions for long-line lints
2022-03-18 00:42:18 +00:00
Max Baumann
3c4192f3e9
fix: ran update_lints
2022-03-18 01:12:39 +01:00
Max Baumann
05e05eaed7
refactor: rename lint to or_then_unwrap
2022-03-18 01:04:33 +01:00
Jason Newcomb
39329d1d40
Add lint cast_enum_constructor
2022-03-17 19:57:35 -04:00
Max Baumann
44c62c9aa2
feat: add tests and fix existing ones
2022-03-18 00:51:26 +01:00
Max Baumann
17ff85081d
feat: rename variable in example
2022-03-18 00:34:24 +01:00
Max Baumann
4493fc7d27
refactor: use pattern matching for MethodCall arguments
...
Co-authored-by: xFrednet <xFrednet@gmail.com>
2022-03-18 00:23:55 +01:00
Max Baumann
c22ff6cd6e
fix: fix clippy_lints
2022-03-17 19:52:07 +01:00
Max Baumann
747bb245e7
fix: fix broken dogfood tests
2022-03-17 19:29:59 +01:00
Max Baumann
3f00f074de
fix: fix tests
2022-03-17 19:13:44 +01:00
Max Baumann
f49a2c3457
feat: add use_unwrap_or
2022-03-17 18:57:28 +01:00
bors
8d5c0eadde
Auto merge of #8552 - Jarcho:ptr_arg_8495, r=xFrednet
...
Don't lint `ptr_arg` on `&mut Cow<_>`
fixes : #8495
changelog: Don't lint `ptr_arg` on `&mut Cow<_>`
2022-03-17 17:05:26 +00:00
J-ZhengLi
4b128624ed
fix #8551 , add test cases, and some code improvement
2022-03-17 23:06:31 +08:00
dswij
bd888d4354
Add some comments
2022-03-17 14:38:39 +08:00
Jason Newcomb
773d20341a
Fix mixed enum variant kinds + code cleanup
2022-03-17 01:09:25 -04:00
Jason Newcomb
08a7157a37
Improve message for match_single_arms
2022-03-16 13:58:09 -04:00
Jason Newcomb
4f8f4b4c82
Handle slice patterns in match_same_arms
2022-03-16 13:53:52 -04:00
Jason Newcomb
5508f461b8
Use DroplessArena
when allocating ResolvedPat
s
...
Fix tuple handling in `match_same_arms`
2022-03-16 13:49:19 -04:00
Jason Newcomb
b37317b028
Check if there are any overlapping patterns between equal arm bodies in match_same_arm
2022-03-16 13:18:29 -04:00
Jason Newcomb
8e5208cbff
Don't lint transmute_undefined_repr
when changing the type of generic params
2022-03-16 12:56:23 -04:00
Jason Newcomb
851e715e5a
Don't lint ptr_arg
on &mut Cow<_>
2022-03-16 12:00:27 -04:00
codehorseman
4beda1be70
resolve the conflict in compiler/rustc_session/src/parse.rs
...
Signed-off-by: codehorseman <cricis@yeah.net>
2022-03-16 20:12:30 +08:00
bors
d23ddab82d
Auto merge of #8544 - nellorocca:dev/5757, r=flip1995
...
Moved ``[try_err]`` to restriction
Fixes #5757
changelog: Moved try_err lint to rescrition for #5757
2022-03-16 09:55:39 +00:00
bors
2b0e730bf3
Auto merge of #8547 - Jarcho:transmute_8501, r=flip1995
...
More `transmute_undefined_repr` fixes
fixes : #8498
fixes : #8501
fixes : #8503
changelog: Allow `transumte_undefined_repr` between fat pointers and `(usize, usize)`
changelog: Allow `transumte_undefined_repr` when one side is a union
changelog: Fix `transumte_undefined_repr` on tuples with one non-zero-sized type.
2022-03-16 09:39:22 +00:00
J-ZhengLi
2909b33a24
quick fix of issue#8542 for lint [needless_match]
...
remove `ref`/`ref mut` check
2022-03-16 16:26:56 +08:00
Jason Newcomb
47c9ed697b
Fix checking transmutes with adjusted types
2022-03-15 23:11:11 -04:00
Jason Newcomb
911e10562a
Don't lint transmute_undefined_repr
on unions.
2022-03-15 22:38:15 -04:00
Jason Newcomb
7fd52b5e3c
Small simplification to transmute_undefined_repr
2022-03-15 22:33:26 -04:00
Jason Newcomb
442d4ce1c3
Don't lint fat pointer to (usize, usize)
conversion in transmute_undefined_repr
2022-03-15 22:31:07 -04:00
Jason Newcomb
e71ac41d44
Fix transmute_undefined_repr
for single element tuples
2022-03-15 21:51:07 -04:00
Kisaragi
9f95e7622d
fix typo in code-block kind specifier
2022-03-16 10:19:19 +09:00
Kisaragi
fc5cbba1a4
fix typo in code-block kind specifier
2022-03-16 08:50:30 +09:00
Jason Newcomb
30b333645d
Don't lint undocumented_unsafe_blocks
on bad proc-macro spans.
2022-03-15 16:52:28 -04:00
Paolo Gentili
a39d649733
Lint list updated
2022-03-15 19:38:40 +01:00
Jason Newcomb
65f96e2b53
Rework undocumented_unsafe_blocks
2022-03-15 14:18:05 -04:00
Paolo Gentili
5c1843dbce
Moved lint to restriction
2022-03-15 18:45:01 +01:00
dswij
6a3dbe4798
unnecessary_lazy_eval
show suggestions on multiline lint
2022-03-15 23:59:26 +08:00
flip1995
b981748036
Move iter_with_drain to nursery
2022-03-15 09:46:49 +01:00
bors
71ecbc42f9
Auto merge of #8509 - smoelius:fix-8507, r=giraffate
...
Fix `unncessary_to_owned` false positive
Fix #8507
changelog: none
2022-03-15 01:08:47 +00:00
Dylan DPC
5ed40229ac
fix typos
2022-03-15 02:00:08 +01:00
xFrednet
2ee5372389
Allow single_component_path_imports
for all macros
2022-03-14 22:45:00 +01:00
flip1995
d1b087fdee
Merge commit 'dc5423ad448877e33cca28db2f1445c9c4473c75' into clippyup
2022-03-14 12:02:53 +01:00
flip1995
d5ab347d5c
Merge remote-tracking branch 'upstream/master' into rustup
2022-03-14 11:29:18 +01:00
bors
e2e492c10e
Auto merge of #8422 - buttercrab:only_used_in_recursion, r=llogiq
...
new lint: `only_used_in_recursion`
changed:
- added `only_used_in_recursion`.
- fixed code that variables are only used in recursion.
- this would not lint when `unused_variable`
This fixes : #8390
-----
changelog: add lint [`only_used_in_recursion`]
2022-03-13 16:11:25 +00:00
Jaeyong Sung
800f66de2b
add clearing return vars
2022-03-14 00:13:57 +09:00
bors
75b616e92f
Auto merge of #8471 - J-ZhengLi:master-issue7040, r=llogiq
...
new lint that detects useless match expression
fixes #7040
changelog: Add new lint [`needless_match`] under complexity lint group
2022-03-13 14:49:56 +00:00
Tianyi Song
a944ccb677
Check if lhs < rhs in modulos and emit
2022-03-11 16:02:49 +08:00
Nicholas Nethercote
e110231260
Improve AdtDef
interning.
...
This commit makes `AdtDef` use `Interned`. Much the commit is tedious
changes to introduce getter functions. The interesting changes are in
`compiler/rustc_middle/src/ty/adt.rs`.
2022-03-11 13:31:24 +11:00
Jaeyong Sung
1ad7e7097a
remove parameters that are only used in recursion
2022-03-10 16:06:35 +09:00
Jaeyong Sung
52d35dca6a
fix build error
2022-03-10 15:53:53 +09:00