Daniel Smith
ee20ebadaf
Move refcell lint into shared module
2020-10-21 11:04:26 -04:00
Daniel Smith
3ed69cdb13
Move existing lint into shared file
2020-10-21 11:04:26 -04:00
Daniel Smith
b3a427d873
Add another test case
2020-10-21 11:04:26 -04:00
Daniel Smith
0f4abbf99a
Better naming post copy/paste
2020-10-21 11:04:26 -04:00
Daniel Smith
070a751d4c
update_lints
2020-10-21 11:04:26 -04:00
Daniel Smith
8727169f72
fmt
2020-10-21 11:04:26 -04:00
Daniel Smith
57bf80f776
Add lint for holding RefCell Ref across an await
2020-10-21 11:04:26 -04:00
bors
74530adcba
Auto merge of #6166 - achris:master, r=flip1995
...
Suggest a compatible shell for 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 fails.
---
*Please keep the line below*
changelog: none
2020-10-19 13:17:07 +00:00
bors
3d3507230c
Auto merge of #6195 - giraffate:sync-from-rust, r=ebroto
...
Rustup
I followed these steps: <https://github.com/rust-lang/rust-clippy/blob/master/CONTRIBUTING.md#fixing-build-failures-caused-by-rust >.
changelog: none
2020-10-19 06:01:21 +00:00
Takayuki Nakata
be136b2712
Merge remote-tracking branch 'upstream/master' into sync-from-rust
2020-10-19 13:05:51 +09:00
bors
01dd31fa60
Auto merge of #6189 - ebroto:rustup, r=ebroto
...
Rustup
changelog: none
r? `@ghost`
2020-10-17 20:13:34 +00:00
Eduardo Broto
bc43862820
Merge remote-tracking branch 'upstream/master' into rustup
2020-10-17 21:55:46 +02:00
Yuki Okushi
82f775d2c4
Rollup merge of #77851 - exrook:split-btreemap, r=dtolnay
...
BTreeMap: refactor Entry out of map.rs into its own file
btree/map.rs is approaching the 3000 line mark, splitting out the entry
code buys about 500 lines of headroom.
I've created this PR because the changes I've made in #77438 will push `map.rs` over the 3000 line limit and cause tidy to complain.
I picked `Entry` to factor out because it feels less tightly coupled to the rest of `BTreeMap` than the various iterator implementations.
Related: #60302
2020-10-18 04:11:07 +09:00
Jacob Hughes
29392a1728
Appease the almightly lord clippy, hallowed be thy name
2020-10-17 13:48:54 -04: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
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
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
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
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