]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agoAdd lint for inline assembly syntax style preference
Jethro Beekman [Mon, 28 Sep 2020 13:30:47 +0000 (15:30 +0200)]
Add lint for inline assembly syntax style preference

3 years agoAuto merge of #6091 - ebroto:rustup, r=ebroto
bors [Sun, 27 Sep 2020 13:33:48 +0000 (13:33 +0000)]
Auto merge of #6091 - ebroto:rustup, r=ebroto

Rustup

changelog: none

r? `@ghost`

3 years agoFix dogfood
Eduardo Broto [Sun, 27 Sep 2020 13:20:19 +0000 (15:20 +0200)]
Fix dogfood

3 years agoRun cargo dev fmt
Eduardo Broto [Sun, 27 Sep 2020 13:17:13 +0000 (15:17 +0200)]
Run cargo dev fmt

3 years agoMerge remote-tracking branch 'upstream/master' into rustup
Eduardo Broto [Sun, 27 Sep 2020 13:09:52 +0000 (15:09 +0200)]
Merge remote-tracking branch 'upstream/master' into rustup

3 years agoAuto merge of #6090 - Fishrock123:rc_buffer-formatting-caveats, r=yaahc
bors [Sun, 27 Sep 2020 00:38:23 +0000 (00:38 +0000)]
Auto merge of #6090 - Fishrock123:rc_buffer-formatting-caveats, r=yaahc

lints: clarify rc_buffer and add caveats

This didn't display some types properly in the docs due the lack of code formatting.

Also, refs for the caveat:
https://github.com/rust-lang/rust-clippy/pull/6044#issuecomment-699559082
https://github.com/http-rs/surf/pull/242

Fwiw I can't get `cargo test` to run, even on nightly. I get:
```
error[E0463]: can't find crate for `rustc_ast`
```

*Please keep the line below*
changelog: none, nightly

3 years agolints: clarify rc_buffer and add caveats
Jeremiah Senkpiel [Sun, 27 Sep 2020 00:19:12 +0000 (17:19 -0700)]
lints: clarify rc_buffer and add caveats

This didn't display some types properly in the docs due the lack of code formatting.

Also, refs for the caveat:
https://github.com/rust-lang/rust-clippy/pull/6044#issuecomment-699559082
https://github.com/http-rs/surf/pull/242

3 years agoAuto merge of #6081 - ilknarf:master, r=matthiaskrgr
bors [Sat, 26 Sep 2020 20:55:53 +0000 (20:55 +0000)]
Auto merge of #6081 - ilknarf:master, r=matthiaskrgr

New Lint: disallowed_method

Fixes https://github.com/rust-lang/rust-clippy/issues/6073

I added a `disallowed_method` lint that works similar to `blacklisted_name`, e.g allows config-defined disallowed method calls.

This lint allows advanced users to patch in undesired method calls for specific projects. It basically uses the DefId of method calls and matches it to parsed strings. Is there an alternative approach that could use more easily digestible configuration strings?

All tests pass as expected except for a linting error on `ui/redundant_pattern_matching_option`, which I am not sure how to resolve since I don't think I changed anything affecting it.

changelog: Add disallowed_method lint to warn on user-defined method calls

3 years agoAuto merge of #6079 - giraffate:print_stdout_in_build_rs, r=ebroto
bors [Sat, 26 Sep 2020 20:34:35 +0000 (20:34 +0000)]
Auto merge of #6079 - giraffate:print_stdout_in_build_rs, r=ebroto

Fix FP in `print_stdout`

Fix #6041

This lint shouldn't be emitted in `build.rs` as `println!` and `print!` are used for the build script.

changelog: none

3 years agoAdd missing attr to clippy_workspace_tests/build.rs
Eduardo Broto [Sat, 26 Sep 2020 20:22:47 +0000 (22:22 +0200)]
Add missing attr to clippy_workspace_tests/build.rs

3 years agoAdd build script but does not work in the dogfood test
Takayuki Nakata [Sat, 26 Sep 2020 14:54:18 +0000 (23:54 +0900)]
Add build script but does not work in the dogfood test

3 years agoRemove all unstable feature support in the `missing_const_for_fn` lint
Oliver Scherer [Sat, 26 Sep 2020 14:23:56 +0000 (16:23 +0200)]
Remove all unstable feature support in the `missing_const_for_fn` lint

3 years agoSome small fixes
Takayuki Nakata [Sat, 26 Sep 2020 14:10:25 +0000 (23:10 +0900)]
Some small fixes

3 years agoMove `qualify_min_const_fn` out of rustc into clippy
Oliver Scherer [Sat, 26 Sep 2020 14:08:24 +0000 (16:08 +0200)]
Move `qualify_min_const_fn` out of rustc into clippy

3 years agoupdate lint description
Frank [Fri, 25 Sep 2020 16:12:45 +0000 (11:12 -0500)]
update lint description

3 years agoremove useless test, update disallowed_method description
Frank [Fri, 25 Sep 2020 16:03:45 +0000 (11:03 -0500)]
remove useless test, update disallowed_method description

3 years agoupdate error message, refactor disallowed_method
Frank [Fri, 25 Sep 2020 14:38:19 +0000 (09:38 -0500)]
update error message, refactor disallowed_method

3 years agofix error message
Frank [Thu, 24 Sep 2020 21:43:29 +0000 (16:43 -0500)]
fix error message

3 years agochange config variables to reference, remove wildcard import
Frank [Thu, 24 Sep 2020 21:26:29 +0000 (16:26 -0500)]
change config variables to reference, remove wildcard import

3 years agoupdate toml_unknown_key test
Frank [Thu, 24 Sep 2020 21:15:24 +0000 (16:15 -0500)]
update toml_unknown_key test

3 years agorun cargo dev fmt
Frank [Thu, 24 Sep 2020 21:00:46 +0000 (16:00 -0500)]
run cargo dev fmt

3 years agorun cargo dev update_lints
Frank [Thu, 24 Sep 2020 20:52:25 +0000 (15:52 -0500)]
run cargo dev update_lints

3 years agoupdate unused variable
Frank [Thu, 24 Sep 2020 20:36:38 +0000 (15:36 -0500)]
update unused variable

3 years agoadd disallowed_method lint
Frank [Thu, 24 Sep 2020 20:32:03 +0000 (15:32 -0500)]
add disallowed_method lint

3 years agoFix the detection of build scripts
Takayuki Nakata [Fri, 25 Sep 2020 14:32:18 +0000 (23:32 +0900)]
Fix the detection of build scripts

3 years agoAuto merge of #6084 - ebroto:ui_tests_cleanup, r=flip1995
bors [Fri, 25 Sep 2020 14:14:25 +0000 (14:14 +0000)]
Auto merge of #6084 - ebroto:ui_tests_cleanup, r=flip1995

UI tests cleanup

`@matthiaskrgr` noticed some `run-pass` annotations in some crash tests that were added in #3922. At that moment they seemed to be necessary to make the tests fail in case of an ICE, but they do not seem to be needed anymore. To test this I forced an ICE in a file with and without annotations, with and without stderr files, and the ICE makes the test fail every time.

In addition, I've applied a suggestion from `@ehuss` and `@jyn514` to add `emit=metadata` to the rustc flags for the UI tests. In my machine this improved the run time from ~17 to ~12 seconds.

changelog: none

3 years agoUse emit=link for auxiliary proc macro crates
Eduardo Broto [Fri, 25 Sep 2020 13:46:32 +0000 (15:46 +0200)]
Use emit=link for auxiliary proc macro crates

3 years agoAdd emit=metadata to UI tests build flags
Eduardo Broto [Fri, 25 Sep 2020 13:20:04 +0000 (15:20 +0200)]
Add emit=metadata to UI tests build flags

This should improve the performance by avoiding codegen

3 years agoRemove run-pass annotations from crash tests
Eduardo Broto [Fri, 25 Sep 2020 13:19:36 +0000 (15:19 +0200)]
Remove run-pass annotations from crash tests

It does not seem to be necessary

3 years agoAuto merge of #77144 - flip1995:clippyup, r=Manishearth
bors [Fri, 25 Sep 2020 06:23:55 +0000 (06:23 +0000)]
Auto merge of #77144 - flip1995:clippyup, r=Manishearth

Update Clippy

Bi-weekly Clippy update.

This includes a `Cargo.lock` update (d445493479711389f4dea3a0f433041077ba2088), so probably needs `rollup=never`.

r? `@Manishearth`

3 years agoRollup merge of #76724 - ecstatic-morse:dataflow-pass-names, r=lcnr
Jonas Schievink [Fri, 25 Sep 2020 00:29:31 +0000 (02:29 +0200)]
Rollup merge of #76724 - ecstatic-morse:dataflow-pass-names, r=lcnr

Allow a unique name to be assigned to dataflow graphviz output

Previously, if the same analysis were invoked multiple times in a single compilation session, the graphviz output for later runs would overwrite that of previous runs. Allow callers to add a unique identifier to each run so this can be avoided.

3 years agoFix FP in `print_stdout`
Takayuki Nakata [Thu, 24 Sep 2020 14:22:54 +0000 (23:22 +0900)]
Fix FP in `print_stdout`

This lint shouldn't be emitted in `build.rs` as `println!` and `print!` are used for the build script.

3 years agoAuto merge of #6077 - ebroto:revert_or_fun_call_const, r=matthiaskrgr
bors [Thu, 24 Sep 2020 14:14:53 +0000 (14:14 +0000)]
Auto merge of #6077 - ebroto:revert_or_fun_call_const, r=matthiaskrgr

Revert: or_fun_call should lint calls to `const fn`s with no args

The changes in #5889 and #5984 were done under the incorrect assumption that a `const fn` with no args was guaranteed to be evaluated at compile time.  A `const fn` is only guaranteed to be evaluated at compile time if it's inside a const context (the initializer of a `const` or a `static`).

See this [zulip conversation](https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/Common.20misconception.3A.20.60const.20fn.60.20and.20its.20effect.20on.20codegen/near/208059113) for more details on this common misconception.

Given that none of the linted methods by `or_fun_call` can be called in const contexts, the lint should make no exceptions.

changelog: [`or_fun_call`] lints again calls to `const fn` with no args

3 years agoAuto merge of #6076 - rail-rain:fix_fp_explicit_counter_loop, r=matthiaskrgr
bors [Thu, 24 Sep 2020 13:45:24 +0000 (13:45 +0000)]
Auto merge of #6076 - rail-rain:fix_fp_explicit_counter_loop, r=matthiaskrgr

Fix a FP in `explicit_counter_loop`

Fixes #4677 and #6074

Fix a false positive in `explicit_counter_loop` where the loop counter is used after incremented, adjust the test so that counters are incremented at the end of the loop and add the test for this false positive.

---

changelog: Fix a false positive in `explicit_counter_loop` where the loop counter is used after incremented

3 years agoMerge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup
flip1995 [Thu, 24 Sep 2020 12:49:22 +0000 (14:49 +0200)]
Merge commit 'e636b88aa180e8cab9e28802aac90adbc984234d' into clippyup

3 years agoAuto merge of #6044 - rschoon:rc-buffer, r=yaahc
bors [Wed, 23 Sep 2020 18:35:08 +0000 (18:35 +0000)]
Auto merge of #6044 - rschoon:rc-buffer, r=yaahc

Add `rc_buffer` lint for checking Rc<String> and friends

Fixes #2623

This is a bit different from the original PR attempting to implement this type of lint.   Rather than linting against converting into the unwanted types, this PR lints against declaring the unwanted type in a struct or function definition.

I'm reasonably happy with what I have here, although I used the fully qualified type names for the Path and OsString suggestions, and I'm not sure if I should have just used the short versions instead, even if they might not have been declared via use.

Also, I don't know if "buffer type" is the best way to put it or not.  Alternatively I could call it a "growable type" or "growable buffer type", but I was thinking of PathBuf when I started making the lint.

changelog: Add `rc_buffer` lint

3 years agoSatisfy rc_buffer lint in Constant::Binary byte string by copying data
Robin Schoonover [Wed, 23 Sep 2020 02:34:38 +0000 (20:34 -0600)]
Satisfy rc_buffer lint in Constant::Binary byte string by copying data

We can avoid the data copy again by fixing rustc_ast::ast::LitKind
later.

3 years agoRevert "Avoid or_fun_call for const_fn with no args"
Eduardo Broto [Tue, 22 Sep 2020 22:39:00 +0000 (00:39 +0200)]
Revert "Avoid or_fun_call for const_fn with no args"

This reverts commit 5d66bd7bb3fd701d70ec11217e3f89fabe5cb0a7.

3 years agoRevert "or_fn_call: ignore nullary associated const fns"
Eduardo Broto [Tue, 22 Sep 2020 22:34:56 +0000 (00:34 +0200)]
Revert "or_fn_call: ignore nullary associated const fns"

This reverts commit 7a66e6502dc3c7085b3f4078c01d4957d96175ed.

3 years agoFix a FP in `explicit_counter_loop`
rail [Wed, 10 Jun 2020 02:05:32 +0000 (14:05 +1200)]
Fix a FP in `explicit_counter_loop`

Fix a false positive in `explicit_counter_loop` where the loop counter is used after incremented,
adjust the test so that counters are incremented at the end of the loop
and add the test for this false positive.

3 years agoAuto merge of #6069 - alex-700:redundant-pattern-matching-in-macro, r=Manishearth
bors [Tue, 22 Sep 2020 16:01:39 +0000 (16:01 +0000)]
Auto merge of #6069 - alex-700:redundant-pattern-matching-in-macro, r=Manishearth

Forbid redundant_pattern_matching triggering in macros

fixes #6065

changelog: forbid redundant_pattern_matching triggering in macros

3 years agoForbid redundant_pattern_matching triggering in macros
Aleksei Latyshev [Sun, 20 Sep 2020 09:38:23 +0000 (12:38 +0300)]
Forbid redundant_pattern_matching triggering in macros

- remove ice-2636 test

3 years agoAuto merge of #6071 - ebroto:rustup, r=ebroto
bors [Mon, 21 Sep 2020 13:43:01 +0000 (13:43 +0000)]
Auto merge of #6071 - ebroto:rustup, r=ebroto

Rustup

r? `@ghost`

changelog: none

3 years agoSplit redundant_pattern_matching tests
Eduardo Broto [Mon, 21 Sep 2020 13:32:26 +0000 (15:32 +0200)]
Split redundant_pattern_matching tests

This is to avoid the 200 lines stderr file limit

3 years agoMerge remote-tracking branch 'upstream/master' into rustup
Eduardo Broto [Mon, 21 Sep 2020 13:11:24 +0000 (15:11 +0200)]
Merge remote-tracking branch 'upstream/master' into rustup

3 years agoRemove `can_suggest` from Clippy.
Christiaan Dirkx [Sun, 20 Sep 2020 22:00:33 +0000 (00:00 +0200)]
Remove `can_suggest` from Clippy.

Removes `can_suggest` from as it is no longer used.
Reverts rust-clippy#5724.

3 years agoUpdate Clippy testcases
Christiaan Dirkx [Sun, 20 Sep 2020 21:59:34 +0000 (23:59 +0200)]
Update Clippy testcases

Update the test `redundant_pattern_matching`: check if `is_some` and `is_none` are suggested within const contexts.

3 years agoAuto merge of #76136 - CDirkx:const-result, r=dtolnay
bors [Sun, 20 Sep 2020 13:07:11 +0000 (13:07 +0000)]
Auto merge of #76136 - CDirkx:const-result, r=dtolnay

Stabilize some Result methods as const

Stabilize the following methods of Result as const:
 - `is_ok`
 - `is_err`
 - `as_ref`

A test is also included, analogous to the test for `const_option`.

These methods are currently const under the unstable feature `const_result` (tracking issue: #67520).
I believe these methods to be eligible for stabilization because of the stabilization of #49146 (Allow if and match in constants) and the trivial implementations, see also: [PR#75463](https://github.com/rust-lang/rust/pull/75463) and [PR#76135](https://github.com/rust-lang/rust/pull/76135).

Note: these methods are the only methods currently under the `const_result` feature, thus this PR results in the removal of the feature.

Related: #76225

3 years agoUpdate src/tools/clippy/clippy_lints/src/matches.rs
CDirkx [Sun, 20 Sep 2020 10:21:23 +0000 (12:21 +0200)]
Update src/tools/clippy/clippy_lints/src/matches.rs

Co-authored-by: Ralf Jung <post@ralfj.de>
3 years agoRemove `can_suggest` check for `is_ok` and `is_err`.
Christiaan Dirkx [Sun, 20 Sep 2020 08:46:30 +0000 (10:46 +0200)]
Remove `can_suggest` check for `is_ok` and `is_err`.

`is_ok` and `is_err` are stabilized as const and can thus always be suggested.

3 years agoUpdate Clippy testcases
Christiaan Dirkx [Sun, 20 Sep 2020 01:32:36 +0000 (03:32 +0200)]
Update Clippy testcases

Update the test `redundant_pattern_matching`: check if `is_ok` and `is_err` are suggested within const contexts.
Also removes the `redundant_pattern_matching_const_result` test, as it is no longer needed.

3 years agoAuto merge of #6046 - rail-rain:change_criteria_non_copy_const, r=flip1995
bors [Fri, 18 Sep 2020 14:34:04 +0000 (14:34 +0000)]
Auto merge of #6046 - rail-rain:change_criteria_non_copy_const, r=flip1995

Change the criteria of `interior_mutable_const`

This implements my suggestion [here](https://github.com/rust-lang/rust-clippy/issues/5050#issuecomment-680310889), and so hopefully fixes #5050.

* stop linting associated types and generic type parameters
* start linting ones in trait impls
  whose corresponding definitions in the traits are generic
* remove the `is_copy` check
  as presumably the only purpose of it is to allow
  generics with `Copy` bounds as `Freeze` is internal
  and generics are no longer linted
* remove the term 'copy' from the tests
  as being `Copy` no longer have meaning

---

changelog: Change the criteria of `declare_interior_mutable_const` and `borrow_interior_mutable_const` to narrow the lints to only lint things that defenitly is a interior mutable type, not potentially.

3 years agoadd `WRAPPED_SELF: Option<Self>` in the test
rail [Thu, 17 Sep 2020 09:14:14 +0000 (21:14 +1200)]
add `WRAPPED_SELF: Option<Self>` in the test

3 years agorewrite the test and fix a minor fp
rail [Thu, 17 Sep 2020 07:37:42 +0000 (19:37 +1200)]
rewrite the test and fix a minor fp

* rewrite the test for `declare_interior_mutable_const from scratch`

* fix a minor false positive where `Cell<"const T>` gets linted twice

3 years agoChange the criteria of `interior_mutable_const`
rail [Tue, 25 Aug 2020 03:13:40 +0000 (15:13 +1200)]
Change the criteria of `interior_mutable_const`

* stop linting associated types and generic type parameters
* start linting ones in trait impls
  whose corresponding definitions in the traits are generic
* remove the `is_copy` check
  as presumably the only purpose of it is to allow
  generics with `Copy` bounds as `Freeze` is internal
  and generics are no longer linted
* remove the term 'copy' from the tests
  as being `Copy` no longer have meaning

3 years agoMove rc_buffer lint into perf category
Robin Schoonover [Wed, 16 Sep 2020 23:19:35 +0000 (17:19 -0600)]
Move rc_buffer lint into perf category

3 years agoAuto merge of #6034 - rail-rain:fix_fp_in_indexing_slicing, r=flip1995
bors [Wed, 16 Sep 2020 22:45:36 +0000 (22:45 +0000)]
Auto merge of #6034 - rail-rain:fix_fp_in_indexing_slicing, r=flip1995

Treat refs to arrays the same as owned arrays in `indexing_slicing` and `out_of_bounds_indexing`

Fixes #6021

...and remove `walk_ptrs_ty` in favour of `peel_refs`, which came in 2019.

---

changelog: Fix a false positive in `indexing_slicing` and `out_of_bounds_indexing` where references to arrays weren't treated as arrays.

3 years agoreplace `walk_ptrs_ty` with `peel_refs`
rail [Fri, 11 Sep 2020 03:06:49 +0000 (15:06 +1200)]
replace `walk_ptrs_ty` with `peel_refs`

3 years agofix a FP in `indexing_slicing`
rail [Fri, 11 Sep 2020 02:41:54 +0000 (14:41 +1200)]
fix a FP in `indexing_slicing`

treat refs to arrays the same as arrays
in `indexing_slicing` and `out_of_bounds_indexing`

3 years agoAuto merge of #5937 - montrivo:option_if_let_else, r=flip1995
bors [Wed, 16 Sep 2020 19:36:49 +0000 (19:36 +0000)]
Auto merge of #5937 - montrivo:option_if_let_else, r=flip1995

option_if_let_else - distinguish pure from impure else expressions

Addresses partially #5821.

changelog: improve the lint `option_if_let_else`. Suggest `map_or` or `map_or_else` based on the else expression purity.

3 years agoAuto merge of #6025 - thomcc:compare_exchange_atomics, r=flip1995
bors [Wed, 16 Sep 2020 18:33:38 +0000 (18:33 +0000)]
Auto merge of #6025 - thomcc:compare_exchange_atomics, r=flip1995

Extend invalid_atomic_ordering for compare_exchange{,_weak} and fetch_update

changelog: The invalid_atomic_ordering lint can now detect misuse of `compare_exchange`, `compare_exchange_weak`, and `fetch_update`.

---

I was surprised not to find an issue or existing support here, since these are the functions which are always hardest to get the ordering right on for me (as the allowed orderings for `fail` depend on the `success` parameter).

I believe this lint now covers all atomic methods which care about their ordering now, but I could be wrong.

Hopefully I didn't forget to do anything for the PR!

3 years agoAuto merge of #6038 - mikerite:lint-5734, r=matthiaskrgr
bors [Wed, 16 Sep 2020 18:13:36 +0000 (18:13 +0000)]
Auto merge of #6038 - mikerite:lint-5734, r=matthiaskrgr

Add `manual-strip` lint

Add `manual-strip` lint.

changelog: Add `manual-strip` lint

3 years agooption_if_let_else - change misleading test file section
Tim Nielens [Wed, 16 Sep 2020 17:59:51 +0000 (19:59 +0200)]
option_if_let_else - change misleading test file section

3 years agoAuto merge of #6048 - giraffate:add_note_to_shadow_unrelated, r=matthiaskrgr
bors [Wed, 16 Sep 2020 17:52:40 +0000 (17:52 +0000)]
Auto merge of #6048 - giraffate:add_note_to_shadow_unrelated, r=matthiaskrgr

Add note to `shadow_unrelated`

Fix #5455.

This lint can be disabled at function level.

changelog: none

3 years agoAuto merge of #6042 - euclio:println-empty, r=flip1995
bors [Wed, 16 Sep 2020 17:16:07 +0000 (17:16 +0000)]
Auto merge of #6042 - euclio:println-empty, r=flip1995

{print,write}-with-newline: do not suggest empty format string

changelog: do not suggest empty format strings in `print-with-newline` and `write-with-newline`

3 years agoAuto merge of #6057 - giraffate:update_doc_about_moving_to_zulip, r=flip1995
bors [Wed, 16 Sep 2020 15:39:39 +0000 (15:39 +0000)]
Auto merge of #6057 - giraffate:update_doc_about_moving_to_zulip, r=flip1995

Update documentation about moving from Discord to Zulip

Moving from Discord to Zulip was discussed at https://github.com/rust-lang/rust-clippy/issues/5943 and new stream in Zulip was created at https://github.com/rust-lang/rust-clippy/issues/5943#issuecomment-691984366.

changelog: none

3 years ago{print,write}-with-newline: do not suggest empty format string
Andy Russell [Mon, 14 Sep 2020 18:58:39 +0000 (14:58 -0400)]
{print,write}-with-newline: do not suggest empty format string

3 years agoUpdate documentation about moving from Discord to Zulip
Takayuki Nakata [Wed, 16 Sep 2020 15:06:43 +0000 (00:06 +0900)]
Update documentation about moving from Discord to Zulip

3 years agoAuto merge of #6056 - rust-lang:flip1995/triagebot, r=flip1995
bors [Wed, 16 Sep 2020 14:40:43 +0000 (14:40 +0000)]
Auto merge of #6056 - rust-lang:flip1995/triagebot, r=flip1995

Add S-* label modifier to triagebot

changelog: none

3 years agoAdd S-* label modifier to triagebot
Philipp Krones [Wed, 16 Sep 2020 14:38:58 +0000 (16:38 +0200)]
Add S-* label modifier to triagebot

3 years agoAuto merge of #6055 - lzutao:bump-cmark, r=phansch
bors [Wed, 16 Sep 2020 05:26:30 +0000 (05:26 +0000)]
Auto merge of #6055 - lzutao:bump-cmark, r=phansch

Bump pulldown-cmark v0.8

Closes  #6054

changelog: none

3 years agobump pulldown-cmark v0.8
Lzu Tao [Wed, 16 Sep 2020 05:09:57 +0000 (12:09 +0700)]
bump pulldown-cmark v0.8

3 years agoExtend testing of rc_buffer lint
Robin Schoonover [Wed, 16 Sep 2020 03:10:50 +0000 (21:10 -0600)]
Extend testing of rc_buffer lint

3 years agooption_if_let_else - distinguish pure from impure else expressions
Tim Nielens [Fri, 21 Aug 2020 22:43:04 +0000 (00:43 +0200)]
option_if_let_else - distinguish pure from impure else expressions

3 years agomanual-strip: Fix formatting
Michael Wright [Tue, 15 Sep 2020 19:25:03 +0000 (21:25 +0200)]
manual-strip: Fix formatting

3 years agomanual-strip: Add additional test
Michael Wright [Tue, 15 Sep 2020 19:30:01 +0000 (21:30 +0200)]
manual-strip: Add additional test

3 years agoMerge branch 'master' into lint-5734
Michael Wright [Tue, 15 Sep 2020 19:21:35 +0000 (21:21 +0200)]
Merge branch 'master' into lint-5734

3 years agoAuto merge of #6043 - HaramanJohal:margin_of_error, r=matthiaskrgr
bors [Tue, 15 Sep 2020 17:17:31 +0000 (17:17 +0000)]
Auto merge of #6043 - HaramanJohal:margin_of_error, r=matthiaskrgr

clarify margin of error in wording of float comparison operator lint messages

fixes #6040

changelog: change wording of float comparison operator to make margin of error less ambiguous

3 years agoAuto merge of #6049 - flip1995:rustup, r=flip1995
bors [Tue, 15 Sep 2020 16:46:41 +0000 (16:46 +0000)]
Auto merge of #6049 - flip1995:rustup, r=flip1995

Fix clippy hard-code slice::Iter path

r? `@ghost`

changelog: none

3 years agoupdate lint docs
Haraman Johal [Tue, 15 Sep 2020 16:29:41 +0000 (17:29 +0100)]
update lint docs

3 years agoAdd note to `shadow_unrelated`
Takayuki Nakata [Tue, 15 Sep 2020 15:25:00 +0000 (00:25 +0900)]
Add note to `shadow_unrelated`

This lint can be disabled at function level.

3 years agoAuto merge of #6045 - giraffate:remove_extra_blank_line, r=flip1995
bors [Tue, 15 Sep 2020 12:26:25 +0000 (12:26 +0000)]
Auto merge of #6045 - giraffate:remove_extra_blank_line, r=flip1995

Remove an extra blank line in `shadow_same`

It seems to be an extra blank line in doc example.

changelog: none

<img width="1143" alt="スクリーンショット 2020-09-15 8 50 30" src="https://user-images.githubusercontent.com/17407489/93149409-369df080-f731-11ea-9a39-d8bbc72b61ee.png">

3 years agoFix clippy hard-code slice::Iter path
Lzu Tao [Tue, 15 Sep 2020 10:21:40 +0000 (10:21 +0000)]
Fix clippy hard-code slice::Iter path

3 years agoAuto merge of #6013 - ebroto:diagnostic_item_restriction, r=flip1995
bors [Tue, 15 Sep 2020 09:30:54 +0000 (09:30 +0000)]
Auto merge of #6013 - ebroto:diagnostic_item_restriction, r=flip1995

Internal lint: suggest `is_type_diagnostic_item` over `match_type` where applicable

changelog: none

3 years agoFix usage of backquotes in suggestion
Eduardo Broto [Tue, 15 Sep 2020 08:31:50 +0000 (10:31 +0200)]
Fix usage of backquotes in suggestion

3 years agoMisc doc updates
Eduardo Broto [Sun, 6 Sep 2020 21:57:24 +0000 (23:57 +0200)]
Misc doc updates

3 years agoFix dogfood after MatchTypeOnDiagItem
Eduardo Broto [Sun, 6 Sep 2020 21:48:04 +0000 (23:48 +0200)]
Fix dogfood after MatchTypeOnDiagItem

3 years agoAdd internal lint MatchTypeOnDiagItem
Eduardo Broto [Sun, 6 Sep 2020 21:32:48 +0000 (23:32 +0200)]
Add internal lint MatchTypeOnDiagItem

3 years agoAdd pass names to some common dataflow analyses
Dylan MacKenzie [Tue, 15 Sep 2020 00:13:47 +0000 (17:13 -0700)]
Add pass names to some common dataflow analyses

3 years agoRemove an extra blank line in `shadow_same`
Takayuki Nakata [Mon, 14 Sep 2020 23:51:52 +0000 (08:51 +0900)]
Remove an extra blank line in `shadow_same`

3 years agoclarify margin of error in wording of float comparison operator lint messages
Haraman Johal [Mon, 14 Sep 2020 23:20:31 +0000 (00:20 +0100)]
clarify margin of error in wording of float comparison operator lint messages

3 years agoApply rc_buffer lint to Arc<T>
Robin Schoonover [Mon, 14 Sep 2020 04:17:10 +0000 (22:17 -0600)]
Apply rc_buffer lint to Arc<T>

3 years agoAdd rc_buffer lint for Rc<String> and other buffer types
Robin Schoonover [Mon, 14 Sep 2020 03:52:25 +0000 (21:52 -0600)]
Add rc_buffer lint for Rc<String> and other buffer types

3 years agoAuto merge of #5998 - deg4uss3r:master, r=yaahc
bors [Mon, 14 Sep 2020 19:56:47 +0000 (19:56 +0000)]
Auto merge of #5998 - deg4uss3r:master, r=yaahc

Add map_err_ignore lint

In a large code base a lot of times errors are ignored by using something like:

```rust
foo.map_err(|_| Some::Enum)?;
```

This drops the original error in favor of a enum that will not have the original error's context. This lint helps catch throwing away the original error in favor of an enum without its context.

---

*Please keep the line below*
changelog: Added map_err_ignore lint

3 years agoFix `manual-strip` dogfood errors
Michael Wright [Mon, 14 Sep 2020 04:11:35 +0000 (06:11 +0200)]
Fix `manual-strip` dogfood errors

3 years agoNew lint: `manual-strip`
Michael Wright [Mon, 14 Sep 2020 04:11:35 +0000 (06:11 +0200)]
New lint: `manual-strip`

Add a new lint, `manual-strip`, that suggests using the `str::strip_prefix`
and `str::strip_suffix` methods introduced in Rust 1.45 when the same
functionality is performed 'manually'.

Closes #5734

3 years agoAuto merge of #6035 - matthiaskrgr:try_into_show_type, r=flip1995
bors [Sun, 13 Sep 2020 18:57:55 +0000 (18:57 +0000)]
Auto merge of #6035 - matthiaskrgr:try_into_show_type, r=flip1995

useless_conversion: show type in error message.

changelog: useless_conversion: show type in error message.

3 years agoMerge pull request #6036 from giraffate/update_verbose_bit_mask_to_pedantic
Manish Goregaokar [Sun, 13 Sep 2020 16:24:23 +0000 (09:24 -0700)]
Merge pull request #6036 from giraffate/update_verbose_bit_mask_to_pedantic

Downgrade `verbose_bit_mask` to pedantic

3 years agoDowngrade `verbose_bit_mask` to pedantic
Takayuki Nakata [Sun, 13 Sep 2020 14:23:16 +0000 (23:23 +0900)]
Downgrade `verbose_bit_mask` to pedantic

3 years agouseless_conversion: show type in error message.
Matthias Krüger [Sun, 13 Sep 2020 10:42:14 +0000 (12:42 +0200)]
useless_conversion: show type in error message.

changelog: useless_conversion: show type in error message.