ThibsG
5a13217ea9
Assert macro args extractor as a common function in higher
2020-10-17 11:54:25 +02:00
bors
4e83a38618
Auto merge of #6123 - montrivo:less_concise_than, r=ebroto
...
add lint manual_unwrap_or
Implements partially #5923 .
changelog: add lint manual_unwrap_or
2020-10-16 20:43:45 +00:00
bors
81890c541e
Auto merge of #6184 - ebroto:bump_cargo_metadata, r=ebroto
...
bump cargo_metadata version
changelog: none
r? `@ghost` (master broken)
2020-10-16 20:20:05 +00:00
Santiago Pastorino
0af467ebf2
Handle ExprKind::ConstBlock on clippy
2020-10-16 17:14:34 -03:00
Eduardo Broto
701c7e2fba
bump cargo_metadata version
2020-10-16 22:11:37 +02:00
bors
e351e5ca69
Auto merge of #6180 - flip1995:rustup, r=flip1995
...
Update semver 0.10 -> 0.11
r? `@ghost,` blocking CI
changelog: none
2020-10-16 12:24:23 +00:00
flip1995
6d358d29b0
Update semver 0.10 -> 0.11
2020-10-16 14:23:17 +02:00
bors
a771557ee9
Auto merge of #6178 - josephlr:sync-from-rust, r=phansch
...
Sync from rust
Fix rustc breakage by running:
```rust
git subtree push -P src/tools/clippy git@github.com:josephlr/rust-clippy sync-from-rust
```
and then adding a commit that runs `cargo dev fmt`
---
changelog: none
2020-10-16 07:45:42 +00:00
Joe Richey
ef91de6402
Run cargo dev fmt
...
Signed-off-by: Joe Richey <joerichey@google.com>
2020-10-15 22:37:53 -07:00
Dylan DPC
d2feccc1ef
Rollup merge of #77493 - hosseind88:ICEs_should_always_print_the_top_of_the_query_stack, r=oli-obk
...
ICEs should always print the top of the query stack
see #76920
2020-10-16 02:10:09 +02:00
est31
2c1e8cfc62
Remove rustc_session::config::Config
...
The wrapper type led to tons of target.target
across the compiler. Its ptr_width field isn't
required any more, as target_pointer_width
is already present in parsed form.
2020-10-15 12:02:24 +02:00
bors
0cba5e6bd3
Auto merge of #6173 - Lotterleben:docs-typo, r=ebroto
...
README: sort en/disabling section, fix typos, add note
it took me a while to figure out why `cargo clippy -- -Aclippy::pedantic -Wclippy::items-after-statements` still showed me *all* the lints. At first I thought it was due to the missing spaces in the current example and I debugged that until I stumbled across an issue noting that you have to touch a random file or run `cargo clean` when you're running clippy repeatedly on an unchanged codebase. This PR is an attempt to save the next person some time and also structure the "Allowing/denying lints" section a bit more while we're at it.
---
*Please keep the line below*
changelog: none
2020-10-15 00:24:39 +00:00
bors
de7e82ed11
Auto merge of #6174 - upsuper-forks:transmute-ptr-to-ref-issue, r=Manishearth
...
Add a known problem for transmute_ptr_to_ref lint
changelog: none
2020-10-14 21:54:32 +00:00
bors
8ae260bc4f
Auto merge of #6175 - ebroto:fix_remark, r=ebroto
...
Fix remark linting on checkboxes
changelog: none
r? `@ghost` since this is blocking CI
2020-10-14 21:31:15 +00:00
Eduardo Broto
2da121d97f
Fix remark linting on checkboxes
2020-10-14 23:26:48 +02:00
Tim Nielens
690a6a6c0e
manual-unwrap-or / remove unwrap_or_else suggestion due to ownership issues
2020-10-14 22:52:07 +02:00
Tim Nielens
a8fb69f065
manual-unwrap-or / more pr remarks
2020-10-14 22:16:48 +02:00
Tim Nielens
fc846c37fc
manual_unwrap_or / use consts::constant_simple helper
2020-10-14 22:16:48 +02:00
Tim Nielens
6d4eeeabcd
manual-unwrap-or / pr remarks
2020-10-14 22:16:48 +02:00
Tim Nielens
9c9327980b
manual-unwrap-or / rename files
2020-10-14 22:16:48 +02:00
Tim Nielens
07b2da884c
add lint less_concise_than_option_unwrap_or
2020-10-14 22:16:48 +02:00
ThibsG
71c29b5be8
Add iterator test case for eq_op
lint
2020-10-14 21:29:53 +02:00
hosseind88
ab0fc477b8
fix stderr file of clippy/custom_ice_message test
2020-10-14 18:19:26 +03:30
Lotte Steenbrink
8ba18aeb69
README: sort en/disabling section, fix typos, add note
2020-10-14 16:45:36 +02:00
Xidorn Quan
e82264860d
Add a known problem for transmute_ptr_to_ref lint
2020-10-14 23:15:01 +11:00
ThibsG
121a047645
Move linting of assert
macros from early to late pass
2020-10-13 23:57:22 +02:00
bors
0b77c35965
Auto merge of #6169 - ThibsG:SameFunctionsInIfConditionIgnoreMacro, r=ebroto
...
Fix FP in `same_functions_in_if_condition` lint about condition as macro
Ignore expr that originate from a macro.
Fixes : #6168
changelog: none
2020-10-13 16:01:11 +00:00
bors
de31dda82f
Auto merge of #6172 - ebroto:rustup, r=ebroto
...
Rustup
changelog: none
r? `@ghost`
2020-10-13 15:28:50 +00:00
Eduardo Broto
cd82a29ad1
Merge remote-tracking branch 'upstream/master' into rustup
2020-10-13 17:16:14 +02:00
ThibsG
e2124086b8
Fix FP in same_functions_in_if_condition
lint about condition as macro
2020-10-13 11:31:13 +02:00
ThibsG
a3e0446afe
Extend to the assert
macro family
2020-10-13 09:31:53 +02:00
Chris Ayoup
8c28ba39b5
suggest a compatible shell for running setup-toolchain.sh
...
setup-toolchain.sh uses "[[" which is a bash builtin, but the guide
suggests running it with sh. On Ubuntu, /bin/sh points to dash and
running the script as described fails.
2020-10-12 21:56:37 -04:00
bors
bf947fcba2
Auto merge of #77796 - jonas-schievink:switchint-refactor, r=oli-obk
...
Refactor how SwitchInt stores jump targets
Closes https://github.com/rust-lang/rust/issues/65693
2020-10-13 00:57:03 +00:00
ThibsG
32fdb8fb0c
Lint on identical variable used as args in assert_eq!
macro call
2020-10-12 23:38:31 +02:00
bors
febd0086a5
Auto merge of #6163 - phansch:remove-one-lazy-static, r=flip1995
...
Remove lazy_static completely and use once_cell feature instead
Follow-up to https://github.com/rust-lang/rust-clippy/pull/6120
This removes the last remaining `lazy_static` usages and replaces them with `SyncLazy` from the `once_cell` feature.
---
changelog: none
2020-10-12 20:59:43 +00:00
Philipp Hansch
7b3493c0e9
fmt
2020-10-12 18:34:06 +02:00
Philipp Hansch
098e4f1195
driver.rs: Replace lazy_static with once_cell
2020-10-12 18:29:29 +02:00
Philipp Hansch
c5774f94ef
lintlist.rs: Replace lazy_static with once_cell
...
Follow-up to https://github.com/rust-lang/rust-clippy/pull/6120
2020-10-12 18:19:18 +02:00
bors
18ffea01ee
Auto merge of #6158 - giraffate:improve_updating_references, r=phansch
...
Remove the generated files by `update-references.sh` if they are empty
An empty file may be generated by `update-references.sh` and committed as is when creating a patch like https://github.com/rust-lang/rust-clippy/pull/6101#issuecomment-702076508 and https://github.com/rust-lang/rust-clippy/pull/6079#pullrequestreview-496502721 . So, I think it would be helpful to add documentation, and automatically remove the generated file if it's empty.
changelog: none
2020-10-12 13:49:19 +00:00
bors
92783e39de
Auto merge of #6157 - rust-lang:result-unit-err, r=ebroto
...
New lint: result-unit-err
This fixes #1721 .
- [x] Followed [lint naming conventions][lint_naming]
- [x] Added passing UI tests (including committed `.stderr` file)
- [x] `cargo test` passes locally
- [x] Executed `cargo dev update_lints`
- [x] Added lint documentation
- [x] Run `cargo dev fmt`
[lint_naming]: https://rust-lang.github.io/rfcs/0344-conventions-galore.html#lints
---
changelog: new lint: result-unit-err
2020-10-11 20:40:43 +00:00
Eduardo Broto
74ae116131
Use lowercase in error messages
2020-10-11 22:28:55 +02:00
Andre Bogus
6021c23159
New lint: result-unit-err
2020-10-11 22:04:59 +02:00
bors
9ead65d611
Auto merge of #6160 - ebroto:rustup, r=ebroto
...
Rustup
changelog: none
r? `@ghost`
2020-10-11 16:26:46 +00:00
Eduardo Broto
8fc0c4b3a8
Merge remote-tracking branch 'upstream/master' into rustup
2020-10-11 18:09:31 +02:00
Takayuki Nakata
377d1fab1f
Remove the generated files by update-references.sh
if they are empty
2020-10-11 22:57:22 +09:00
bors
29cff6feff
Auto merge of #77649 - dash2507:replace_run_compiler, r=matthewjasper
...
Replace run_compiler with RunCompiler builder pattern
Fixes #77286 . Replaces rustc_driver:run_compiler with RunCompiler builder pattern.
2020-10-11 01:26:06 +00:00
Jonas Schievink
1178777457
Refactor how SwitchInt stores jump targets
2020-10-10 17:46:11 +02:00
bors
7118d37bf8
Auto merge of #6154 - flip1995:ice_fixes, r=ebroto
...
Fix two ICEs caused by ty.is_{sized,freeze}
Fixes #6153
Properly fixes #6139
The test case in #6153 is kind of weird. Even removing one of the arguments of the `foo` function prevented the ICE. I think this test case is actually minimal.
changelog: none
2020-10-10 13:29:05 +00:00
flip1995
52e650ae88
Add test for ICE #6153
2020-10-10 15:12:20 +02:00
flip1995
cf81975d77
Fix two ICEs caused by ty.is_{sized,freeze}
2020-10-10 14:04:14 +02:00