]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agoAuto merge of #6389 - giraffate:sync-from-rust, r=llogiq
bors [Fri, 27 Nov 2020 06:53:59 +0000 (06:53 +0000)]
Auto merge of #6389 - giraffate:sync-from-rust, r=llogiq

Rustup

changelog: none

3 years agocargo dev fmt
Takayuki Nakata [Fri, 27 Nov 2020 01:32:44 +0000 (10:32 +0900)]
cargo dev fmt

3 years agoMerge remote-tracking branch 'upstream/master' into sync-from-rust
Takayuki Nakata [Fri, 27 Nov 2020 01:25:07 +0000 (10:25 +0900)]
Merge remote-tracking branch 'upstream/master' into sync-from-rust

3 years agoAuto merge of #77671 - flip1995:lint_list_always_plugins, r=oli-obk,Manishearth
bors [Thu, 26 Nov 2020 18:51:45 +0000 (18:51 +0000)]
Auto merge of #77671 - flip1995:lint_list_always_plugins, r=oli-obk,Manishearth

Always print lints from plugins, if they're available

Currently you can get a list of lints and lint groups by running `rustc
-Whelp`. This prints an additional line at the end:
```
Compiler plugins can provide additional lints and lint groups. To see a listing of these, re-run `rustc -W help` with a crate filename.
```

Clippy is such a "compiler plugin", that provides additional lints.
Running `clippy-driver -Whelp` (`rustc` wrapper) still only prints the
rustc lints with the above message at the end. But when running
`clippy-driver -Whelp main.rs`, where `main.rs` is any rust file, it
also prints Clippy lints. I don't think this is a good approach from a
UX perspective: Why is a random file necessary to print a help message?

This PR changes this behavior: Whenever a compiler callback
registers lints, it is assumed that these lints come from a plugin and
are printed without having to specify a Rust source file.

Fixes rust-lang/rust-clippy#6122

cc `@Manishearth` `@ebroto` for the Clippy changes.

3 years agoAuto merge of #6362 - nico-abram:unnecessary_cast_dot_float_literal, r=ebroto
bors [Thu, 26 Nov 2020 08:41:16 +0000 (08:41 +0000)]
Auto merge of #6362 - nico-abram:unnecessary_cast_dot_float_literal, r=ebroto

Fix rust-lang/rust#79255 - Incorrect try suggestion for float cast

changelog: Fix rust-lang/rust#79255 - Incorrect try suggestion for float literal cast ending in dot

3 years agoFix rust-lang/rust#79255 - Incorrect try suggestion for unnecessary float literal...
unknown [Sun, 22 Nov 2020 00:08:32 +0000 (21:08 -0300)]
Fix rust-lang/rust#79255 - Incorrect try suggestion for unnecessary float literal cast ending in dot

3 years agoAuto merge of #6379 - Suyash458:master, r=flip1995
bors [Wed, 25 Nov 2020 19:41:42 +0000 (19:41 +0000)]
Auto merge of #6379 - Suyash458:master, r=flip1995

update readme for specifying msrv

changelog: add some documentation for the `msrv` feature (#6097)
related PR: https://github.com/rust-lang/rust-clippy/pull/6201

3 years agoFix formatting in README.md
Philipp Krones [Wed, 25 Nov 2020 19:37:32 +0000 (20:37 +0100)]
Fix formatting in README.md

3 years agoupdate README.md
Suyash458 [Wed, 25 Nov 2020 16:39:50 +0000 (22:09 +0530)]
update README.md

3 years agoAuto merge of #6333 - PunitLodha:master, r=flip1995
bors [Wed, 25 Nov 2020 16:02:42 +0000 (16:02 +0000)]
Auto merge of #6333 - PunitLodha:master, r=flip1995

Added lint str_to_string

*Please write a short comment explaining your change (or "none" for internal only changes)*
changelog: un-deprecate [`str_to_string`] and [`string_to_string`] and introduce them as `restriction` lints again.
Fixes #5610
Added new lint:- str_to_string
r? `@flip1995`

3 years agoupdate README.md for specifying msrv
Suyash458 [Wed, 25 Nov 2020 15:46:44 +0000 (21:16 +0530)]
update README.md for specifying msrv

3 years agoadded lints str_to_string and string_to_string
PunitLodha [Sat, 14 Nov 2020 13:51:33 +0000 (19:21 +0530)]
added lints str_to_string and string_to_string

3 years agoAuto merge of #6201 - Suyash458:master, r=flip1995
bors [Wed, 25 Nov 2020 11:39:30 +0000 (11:39 +0000)]
Auto merge of #6201 - Suyash458:master, r=flip1995

Add support for minimum supported rust version

add configuration option for minimum supported rust version
add msrv attribute to some lints listed in #6097
add tests
addresses #6097

changelog: Add `msrv` configuration to Clippy. This should get a longer changelog entry.

3 years agoAdd test for multiple defined msrv attrs
flip1995 [Wed, 25 Nov 2020 11:19:42 +0000 (12:19 +0100)]
Add test for multiple defined msrv attrs

3 years agoAdd note where the first definition of msrv attr is
flip1995 [Wed, 25 Nov 2020 11:19:13 +0000 (12:19 +0100)]
Add note where the first definition of msrv attr is

3 years agoImprove extract_msrv_attr! situation
flip1995 [Wed, 25 Nov 2020 10:50:13 +0000 (11:50 +0100)]
Improve extract_msrv_attr! situation

3 years agoadd support for minimum supported rust version.
Suyash458 [Wed, 21 Oct 2020 12:47:34 +0000 (18:17 +0530)]
add support for minimum supported rust version.

add configuration option for minimum supported rust version
add msrv attribute to some lints listed in #6097
add tests

3 years agoMove lev_distance to rustc_ast, make non-generic
Arlie Davis [Thu, 12 Nov 2020 19:24:10 +0000 (11:24 -0800)]
Move lev_distance to rustc_ast, make non-generic

rustc_ast currently has a few dependencies on rustc_lexer. Ideally, an AST
would not have any dependency its lexer, for minimizing unnecessarily
design-time dependencies. Breaking this dependency would also have practical
benefits, since modifying rustc_lexer would not trigger a rebuild of rustc_ast.

This commit does not remove the rustc_ast --> rustc_lexer dependency,
but it does remove one of the sources of this dependency, which is the
code that handles fuzzy matching between symbol names for making suggestions
in diagnostics. Since that code depends only on Symbol, it is easy to move
it to rustc_span. It might even be best to move it to a separate crate,
since other tools such as Cargo use the same algorithm, and have simply
contain a duplicate of the code.

This changes the signature of find_best_match_for_name so that it is no
longer generic over its input. I checked the optimized binaries, and this
function was duplicated at nearly every call site, because most call sites
used short-lived iterator chains, generic over Map and such. But there's
no good reason for a function like this to be generic, since all it does
is immediately convert the generic input (the Iterator impl) to a concrete
Vec<Symbol>. This has all of the costs of generics (duplicated method bodies)
with no benefit.

Changing find_best_match_for_name to be non-generic removed about 10KB of
code from the optimized binary. I know it's a drop in the bucket, but we have
to start reducing binary size, and beginning to tame over-use of generics
is part of that.

3 years agoAuto merge of #6339 - CDirkx:redundant-pattern-match-poll, r=ebroto
bors [Tue, 24 Nov 2020 23:19:43 +0000 (23:19 +0000)]
Auto merge of #6339 - CDirkx:redundant-pattern-match-poll, r=ebroto

Change `redundant_pattern_matching` to also lint `std::task::Poll`

`reduntant_pattern_matching` currently lints pattern matching on `Option` and `Result` where the `is_variant` utility methods could be used instead: `is_some`, `is_none`, `is_ok`, `is_err`. This PR extends this behaviour to `std::task::Poll`, suggesting the methods `is_pending` and `is_ready`.

Motivation: The current description of `redundant_pattern_matching` mentions

> It's more concise and clear to just use the proper utility function

which in my mind applies to `Poll` as well.

changelog: Enhance [`redundant_pattern_matching`] to also lint on `std::task::Poll`

3 years agoAuto merge of #6374 - flip1995:rustup, r=flip1995
bors [Tue, 24 Nov 2020 16:07:11 +0000 (16:07 +0000)]
Auto merge of #6374 - flip1995:rustup, r=flip1995

Rustup

r? `@ghost`

changelog: [`panic`],[`unimplemented`],[`unreachable`],[`todo`] now also handle the `core::` version of those macros correctly.

3 years agoMerge remote-tracking branch 'upstream/master' into rustup
flip1995 [Tue, 24 Nov 2020 15:59:28 +0000 (16:59 +0100)]
Merge remote-tracking branch 'upstream/master' into rustup

3 years agoclippy: Remove now obsolete lintlist module
flip1995 [Wed, 7 Oct 2020 14:05:13 +0000 (16:05 +0200)]
clippy: Remove now obsolete lintlist module

Also stop updating the lintlist module in clippy_dev update_lints

3 years agoclippy: Let rustc handle describing lints
flip1995 [Wed, 7 Oct 2020 14:04:22 +0000 (16:04 +0200)]
clippy: Let rustc handle describing lints

3 years agoAuto merge of #79228 - flip1995:clippyup, r=oli-obk
bors [Tue, 24 Nov 2020 06:56:02 +0000 (06:56 +0000)]
Auto merge of #79228 - flip1995:clippyup, r=oli-obk

Update Clippy

Biweekly Clippy update

r? `@Manishearth`

3 years agoAuto merge of #6313 - giraffate:fix_fp_needless_collect, r=ebroto
bors [Mon, 23 Nov 2020 22:26:45 +0000 (22:26 +0000)]
Auto merge of #6313 - giraffate:fix_fp_needless_collect, r=ebroto

Fix FP in indirect `needless_collect` when used multiple times

Fix https://github.com/rust-lang/rust-clippy/issues/5991
Fix https://github.com/rust-lang/rust-clippy/issues/6297

changelog: Fix FP in indirect `needless_collect` when used multiple times

3 years agoAuto merge of #6371 - ebroto:rustup, r=ebroto
bors [Mon, 23 Nov 2020 22:05:39 +0000 (22:05 +0000)]
Auto merge of #6371 - ebroto:rustup, r=ebroto

Rustup

changelog: none

r? `@ghost`

3 years agoAuto merge of #78343 - camelid:macros-qualify-panic, r=m-ou-se
bors [Mon, 23 Nov 2020 22:05:28 +0000 (22:05 +0000)]
Auto merge of #78343 - camelid:macros-qualify-panic, r=m-ou-se

Qualify `panic!` as `core::panic!` in non-built-in `core` macros

Fixes #78333.

-----

Otherwise code like this

    #![no_implicit_prelude]

    fn main() {
        ::std::todo!();
        ::std::unimplemented!();
    }

will fail to compile, which is unfortunate and presumably unintended.

This changes many invocations of `panic!` in a `macro_rules!` definition
to invocations of `$crate::panic!`, which makes the invocations hygienic.

Note that this does not make the built-in macro `assert!` hygienic.

3 years agoMerge remote-tracking branch 'upstream/master' into rustup
Eduardo Broto [Mon, 23 Nov 2020 22:02:12 +0000 (23:02 +0100)]
Merge remote-tracking branch 'upstream/master' into rustup

3 years agoQualify `panic!` as `core::panic!` in non-built-in `core` macros
Camelid [Sun, 25 Oct 2020 01:35:46 +0000 (18:35 -0700)]
Qualify `panic!` as `core::panic!` in non-built-in `core` macros

Otherwise code like this

    #![no_implicit_prelude]

    fn main() {
        ::std::todo!();
        ::std::unimplemented!();
    }

will fail to compile, which is unfortunate and presumably unintended.

This changes many invocations of `panic!` in a `macro_rules!` definition
to invocations of `$crate::panic!`, which makes the invocations hygienic.

Note that this does not make the built-in macro `assert!` hygienic.

3 years agoAuto merge of #78439 - lzutao:rm-clouldabi, r=Mark-Simulacrum
bors [Mon, 23 Nov 2020 19:01:19 +0000 (19:01 +0000)]
Auto merge of #78439 - lzutao:rm-clouldabi, r=Mark-Simulacrum

Drop support for all cloudabi targets

`cloudabi` is a tier-3 target, and [it is no longer being maintained upstream][no].

This PR drops supports for cloudabi targets. Those targets are:
* aarch64-unknown-cloudabi
* armv7-unknown-cloudabi
* i686-unknown-cloudabi
* x86_64-unknown-cloudabi

Since this drops supports for a target, I'd like somebody to tag `relnotes` label to this PR.

Some other issues:
* The tidy exception for `cloudabi` crate is still remained because
  * `parking_lot v0.9.0` and `parking_lot v0.10.2` depends on `cloudabi v0.0.3`.
  * `parking_lot v0.11.0` depends on `cloudabi v0.1.0`.

[no]: https://github.com/NuxiNL/cloudabi#note-this-project-is-unmaintained

3 years agoAuto merge of #6369 - camsteffen:cast-cfg, r=Manishearth
bors [Mon, 23 Nov 2020 16:33:13 +0000 (16:33 +0000)]
Auto merge of #6369 - camsteffen:cast-cfg, r=Manishearth

Disable unnecessary_cast for cfg-dependant types

changelog: Disable unnecessary_cast for cfg-dependant types

Fix  #6331

3 years agoAuto merge of #6317 - chansuke:add-external-macro, r=llogiq
bors [Mon, 23 Nov 2020 13:26:28 +0000 (13:26 +0000)]
Auto merge of #6317 - chansuke:add-external-macro, r=llogiq

Add exteranal macros for as_conversions

Added external macros to this PR https://github.com/rust-lang/rust-clippy/pull/4888.

r? `@llogiq`

changelog: none

3 years agoFix ICE in utils::implements_trait
flip1995 [Mon, 23 Nov 2020 12:52:27 +0000 (13:52 +0100)]
Fix ICE in utils::implements_trait

This only happend when debug_assertions were enabled in rustc

3 years agoMerge commit '3e7c6dec244539970b593824334876f8b6ed0b18' into clippyup
flip1995 [Mon, 23 Nov 2020 12:51:04 +0000 (13:51 +0100)]
Merge commit '3e7c6dec244539970b593824334876f8b6ed0b18' into clippyup

3 years agoDisable unnecessary_cast for cfg-dependant types
Cameron Steffen [Mon, 23 Nov 2020 01:21:01 +0000 (19:21 -0600)]
Disable unnecessary_cast for cfg-dependant types

3 years agoDrop support for cloudabi targets
Lzu Tao [Tue, 27 Oct 2020 13:10:31 +0000 (13:10 +0000)]
Drop support for cloudabi targets

3 years agoAuto merge of #6361 - integer32llc:doc-style, r=carols10cents
bors [Sun, 22 Nov 2020 15:34:56 +0000 (15:34 +0000)]
Auto merge of #6361 - integer32llc:doc-style, r=carols10cents

Small grammar, punctuation, and code style improvements to docs

changelog: Made small grammar, punctuation, and code style improvements to docs

I recently found some places in rust-lang/rust that had lists without spaces after commas, which led me to look for more places, which led me over here to find:

- Some similar lists in code examples that could use spaces after commas to be idiomatic Rust style
- Some lists in documentation text that didn't have spaces after commas, needed an Oxford comma (fight me), or were otherwise misformatted
- Some other grammar improvements in the area of the other changes

These changes should only be in user-facing documentation or output.

3 years agoApply suggestions from code review to change "that" to "which"
Carol (Nichols || Goulding) [Sun, 22 Nov 2020 15:12:41 +0000 (10:12 -0500)]
Apply suggestions from code review to change "that" to "which"

Co-authored-by: oliver <16816606+o752d@users.noreply.github.com>
3 years agoSmall grammar, punctuation, and code style improvements to docs
Carol (Nichols || Goulding) [Sat, 21 Nov 2020 20:00:03 +0000 (15:00 -0500)]
Small grammar, punctuation, and code style improvements to docs

3 years agoAuto merge of #6363 - o752d:patch-2, r=flip1995
bors [Sun, 22 Nov 2020 14:08:01 +0000 (14:08 +0000)]
Auto merge of #6363 - o752d:patch-2, r=flip1995

a typo

typo

changelog: none

3 years agoAuto merge of #6364 - o752d:master, r=flip1995
bors [Sun, 22 Nov 2020 13:48:02 +0000 (13:48 +0000)]
Auto merge of #6364 - o752d:master, r=flip1995

revisiting a typo

changelog: none

3 years agoupdate
oliver [Sun, 22 Nov 2020 04:50:09 +0000 (00:50 -0400)]
update

3 years agoa typo
oliver [Sun, 22 Nov 2020 04:44:47 +0000 (04:44 +0000)]
a typo

typo

3 years agoThread `Constness` through selection
Jonas Schievink [Sun, 22 Nov 2020 01:13:53 +0000 (02:13 +0100)]
Thread `Constness` through selection

3 years agoAuto merge of #6354 - Daniel-B-Smith:refcell_ref_await, r=flip1995
bors [Fri, 20 Nov 2020 16:51:41 +0000 (16:51 +0000)]
Auto merge of #6354 - Daniel-B-Smith:refcell_ref_await, r=flip1995

Downgrade the await holding lints from correctness

We found a false positive in these lints (see https://github.com/rust-lang/rust-clippy/issues/6353 for more details). As a short-term mitigation, this downgrades the lints from correctness to limit the noise.

changelog: downgrade AWAIT_HOLDING_REFCELL_REF and AWAIT_HOLDING_LOCK to pedantic. From rustup earlier, where I forgot the changlog: deprecate [`panic_params`] (uplifted)

3 years agoRevert "Convert the await holding lints to correctness"
Daniel Smith [Fri, 20 Nov 2020 16:35:15 +0000 (11:35 -0500)]
Revert "Convert the await holding lints to correctness"

This reverts commit d8c6bce4407b1c99ed961f75a093ffe767818069.

3 years agoAuto merge of #6347 - flip1995:changelog, r=Manishearth
bors [Fri, 20 Nov 2020 09:58:55 +0000 (09:58 +0000)]
Auto merge of #6347 - flip1995:changelog, r=Manishearth

Changelog Rust 1.48

[Rendered](https://github.com/flip1995/rust-clippy/blob/changelog/CHANGELOG.md)

This changelog is **big**. Hacktoberfest was pretty good for us, even though we had too few reviewers.

changelog: none

3 years agoAuto merge of #6351 - flip1995:rustup, r=flip1995
bors [Fri, 20 Nov 2020 09:07:56 +0000 (09:07 +0000)]
Auto merge of #6351 - flip1995:rustup, r=flip1995

Rustup

r? `@ghost`

changelog: none

3 years agoFix dogfood errors
flip1995 [Fri, 20 Nov 2020 09:06:26 +0000 (10:06 +0100)]
Fix dogfood errors

3 years agoProperly deprecate panic_params lint
flip1995 [Fri, 20 Nov 2020 08:37:47 +0000 (09:37 +0100)]
Properly deprecate panic_params lint

3 years agoClippy: Match on assert!() expansions without an inner block.
Mara Bos [Thu, 19 Nov 2020 18:47:25 +0000 (19:47 +0100)]
Clippy: Match on assert!() expansions without an inner block.

3 years agoRemove the clippy::panic-params lint.
Mara Bos [Thu, 19 Nov 2020 17:13:32 +0000 (18:13 +0100)]
Remove the clippy::panic-params lint.

Rustc itself now warns for all cases that triggered this lint.

3 years agoImprove changlog update documentation
flip1995 [Thu, 19 Nov 2020 10:23:59 +0000 (11:23 +0100)]
Improve changlog update documentation

3 years agoFix trailing whitespaces in CHANGELOG file
flip1995 [Thu, 19 Nov 2020 10:23:28 +0000 (11:23 +0100)]
Fix trailing whitespaces in CHANGELOG file

3 years agoAdd CHANGELOG for 1.48
flip1995 [Thu, 19 Nov 2020 10:22:59 +0000 (11:22 +0100)]
Add CHANGELOG for 1.48

3 years agoAuto merge of #6345 - giraffate:follow_up_of_rustup, r=flip1995
bors [Thu, 19 Nov 2020 07:40:14 +0000 (07:40 +0000)]
Auto merge of #6345 - giraffate:follow_up_of_rustup, r=flip1995

Revert "Add `rustfmt::skip` as a work around"

This reverts commit 0e803417f997ba35c0045704dd347e64c2a1786c.

Fixed by rustfmt v1.4.27 available in the latest nightly (2020-11-18). Refer to https://github.com/rust-lang/rustfmt/issues/4528.

changelog: none

3 years agoRollup merge of #79145 - camelid:clippy-fix-panics, r=flip1995
Mara Bos [Wed, 18 Nov 2020 14:46:36 +0000 (15:46 +0100)]
Rollup merge of #79145 - camelid:clippy-fix-panics, r=flip1995

Fix handling of panic calls

This should make Clippy more resilient and will unblock #78343.

This PR is made against rust-lang/rust to avoid the need for a subtree
sync at ``@flip1995's`` suggestion in rust-lang/rust-clippy#6310.

r? ``@flip1995``
cc ``@m-ou-se``

3 years agoRevert "Add `rustfmt::skip` as a work around"
Takayuki Nakata [Wed, 18 Nov 2020 03:36:47 +0000 (12:36 +0900)]
Revert "Add `rustfmt::skip` as a work around"

This reverts commit 0e803417f997ba35c0045704dd347e64c2a1786c.

Fixed by https://github.com/rust-lang/rustfmt/issues/4528.

3 years agoAuto merge of #6340 - giraffate:improve_doc_for_map_clone, r=Manishearth
bors [Wed, 18 Nov 2020 02:49:29 +0000 (02:49 +0000)]
Auto merge of #6340 - giraffate:improve_doc_for_map_clone, r=Manishearth

Improve doc about `map_clone`

A follow up of https://github.com/rust-lang/rust-clippy/issues/6239#issuecomment-719100677.

`map_clone` works with not only `Iterator` but `Option` although not written in [doc](https://rust-lang.github.io/rust-clippy/master/#map_clone). Also, an example in the doc shows  a usage of dereferencing, but this isn't also written.

changelog: Improve doc about `map_clone`

3 years agoImprove doc about `map_clone`
Takayuki Nakata [Tue, 17 Nov 2020 23:33:25 +0000 (08:33 +0900)]
Improve doc about `map_clone`

3 years agoChange `redundant_pattern_matching` to also lint `std::task::Poll`
Christiaan Dirkx [Tue, 17 Nov 2020 21:34:39 +0000 (22:34 +0100)]
Change `redundant_pattern_matching` to also lint `std::task::Poll`

Suggest using utility methods `is_pending` and `is_ready`.

3 years agoAuto merge of #6070 - matsujika:unnecessary_wrap, r=flip1995
bors [Tue, 17 Nov 2020 20:28:32 +0000 (20:28 +0000)]
Auto merge of #6070 - matsujika:unnecessary_wrap, r=flip1995

Add new lint `unnecessary_wrap`

Fixes #5969

changelog: New lint [`unnecessary_wraps`]

3 years agoFix handling of panic calls
Camelid [Tue, 17 Nov 2020 20:16:15 +0000 (12:16 -0800)]
Fix handling of panic calls

This should make Clippy more resilient and will unblock #78343.

This PR is made against rust-lang/rust to avoid the need for a subtree
sync at @flip1995's suggestion in rust-lang/rust-clippy#6310.

3 years agoAuto merge of #6337 - ThibsG:FixIce6332, r=Manishearth
bors [Tue, 17 Nov 2020 17:55:46 +0000 (17:55 +0000)]
Auto merge of #6337 - ThibsG:FixIce6332, r=Manishearth

Remove `expect()` calls to avoid ICEs in `deref_addrof` lint

Fixes: #6332
changelog: none

3 years agoAuto merge of #6338 - flip1995:rustup, r=flip1995
bors [Tue, 17 Nov 2020 17:10:04 +0000 (17:10 +0000)]
Auto merge of #6338 - flip1995:rustup, r=flip1995

Rustup

r? `@ghost`

changelog: none

3 years agoRun cargo dev fmt
flip1995 [Tue, 17 Nov 2020 17:08:12 +0000 (18:08 +0100)]
Run cargo dev fmt

3 years agoPluralize lint name
Hirochika Matsumoto [Tue, 17 Nov 2020 16:01:22 +0000 (01:01 +0900)]
Pluralize lint name

3 years agoFix embarrassing grammatical error
Hirochika Matsumoto [Sat, 14 Nov 2020 10:39:41 +0000 (19:39 +0900)]
Fix embarrassing grammatical error

3 years agoIgnore trait implementations
Hirochika Matsumoto [Sat, 14 Nov 2020 10:25:54 +0000 (19:25 +0900)]
Ignore trait implementations

3 years agoUpdate stderr files
Hirochika Matsumoto [Sat, 14 Nov 2020 09:54:16 +0000 (18:54 +0900)]
Update stderr files

3 years agoUpdate stderr files
Hirochika Matsumoto [Mon, 2 Nov 2020 14:59:47 +0000 (23:59 +0900)]
Update stderr files

3 years agoFix clippy error
Hirochika Matsumoto [Sun, 18 Oct 2020 10:35:59 +0000 (19:35 +0900)]
Fix clippy error

3 years agoSkip functions in PartialOrd
Hirochika Matsumoto [Sun, 18 Oct 2020 10:24:11 +0000 (19:24 +0900)]
Skip functions in PartialOrd

3 years agoRemove wildcard use
Hirochika Matsumoto [Sun, 18 Oct 2020 09:46:16 +0000 (18:46 +0900)]
Remove wildcard use

3 years agoDowngrade applicability to MaybeIncorrect
Hirochika Matsumoto [Sun, 18 Oct 2020 09:36:37 +0000 (18:36 +0900)]
Downgrade applicability to MaybeIncorrect

3 years agoAllow this lint on lint tests
Hirochika Matsumoto [Sun, 18 Oct 2020 08:55:25 +0000 (17:55 +0900)]
Allow this lint on lint tests

3 years agoSkip function with no exprs contained
Hirochika Matsumoto [Sun, 18 Oct 2020 08:27:08 +0000 (17:27 +0900)]
Skip function with no exprs contained

3 years agoMake lint skip macros
Hirochika Matsumoto [Sun, 18 Oct 2020 08:17:45 +0000 (17:17 +0900)]
Make lint skip macros

3 years agoAdd support for methods
Hirochika Matsumoto [Sun, 18 Oct 2020 07:53:18 +0000 (16:53 +0900)]
Add support for methods

3 years agoMake lint skip closures
Hirochika Matsumoto [Sun, 18 Oct 2020 07:30:46 +0000 (16:30 +0900)]
Make lint skip closures

3 years agoRun `cargo dev fmt`
Hirochika Matsumoto [Mon, 12 Oct 2020 10:37:27 +0000 (19:37 +0900)]
Run `cargo dev fmt`

3 years agoImprove lint message
Hirochika Matsumoto [Mon, 12 Oct 2020 10:27:47 +0000 (19:27 +0900)]
Improve lint message

3 years agoUpdate clippy_lints/src/unnecessary_wrap.rs
Hirochika Matsumoto [Mon, 12 Oct 2020 10:21:04 +0000 (19:21 +0900)]
Update clippy_lints/src/unnecessary_wrap.rs

Co-authored-by: Philipp Krones <hello@philkrones.com>
3 years agoMove `find_all_ret_expressions` into `utils`
Hirochika Matsumoto [Fri, 2 Oct 2020 09:21:17 +0000 (18:21 +0900)]
Move `find_all_ret_expressions` into `utils`

3 years agoAdd test case
Hirochika Matsumoto [Sat, 26 Sep 2020 07:27:10 +0000 (16:27 +0900)]
Add test case

3 years agoSplit lint suggestion into two
Hirochika Matsumoto [Sat, 26 Sep 2020 06:39:39 +0000 (15:39 +0900)]
Split lint suggestion into two

3 years agoRun rustfmt
Hirochika Matsumoto [Tue, 22 Sep 2020 18:48:15 +0000 (03:48 +0900)]
Run rustfmt

3 years agoCall `diag.multipart_suggestion` instead
Hirochika Matsumoto [Tue, 22 Sep 2020 18:42:58 +0000 (03:42 +0900)]
Call `diag.multipart_suggestion` instead

3 years agoFix typo
Hirochika Matsumoto [Tue, 22 Sep 2020 18:06:52 +0000 (03:06 +0900)]
Fix typo

Co-authored-by: Philipp Krones <hello@philkrones.com>
3 years agoOptout rustfix test
Hirochika Matsumoto [Tue, 22 Sep 2020 17:57:47 +0000 (02:57 +0900)]
Optout rustfix test

3 years agoRefactor code according to reivews
Hirochika Matsumoto [Tue, 22 Sep 2020 17:53:55 +0000 (02:53 +0900)]
Refactor code according to reivews

3 years agoAdd test cases
Hirochika Matsumoto [Sun, 20 Sep 2020 15:11:28 +0000 (00:11 +0900)]
Add test cases

3 years agoFix lint example
Hirochika Matsumoto [Sun, 20 Sep 2020 15:06:25 +0000 (00:06 +0900)]
Fix lint example

3 years agoAdd suggestion on type signatures
Hirochika Matsumoto [Sun, 20 Sep 2020 09:22:01 +0000 (18:22 +0900)]
Add suggestion on type signatures

3 years agoAdd new lint to detect unnecessarily wrapped value
Hirochika Matsumoto [Sat, 19 Sep 2020 17:03:14 +0000 (02:03 +0900)]
Add new lint to detect unnecessarily wrapped value

3 years agoAuto merge of #78779 - LeSeulArtichaut:ty-visitor-return, r=oli-obk
bors [Tue, 17 Nov 2020 12:24:34 +0000 (12:24 +0000)]
Auto merge of #78779 - LeSeulArtichaut:ty-visitor-return, r=oli-obk

Introduce `TypeVisitor::BreakTy`

Implements MCP rust-lang/compiler-team#383.
r? `@ghost`
cc `@lcnr` `@oli-obk`

~~Blocked on FCP in rust-lang/compiler-team#383.~~

3 years agoRemove `expect()` calls to avoid ICEs in `deref_addrof` lint
ThibsG [Mon, 16 Nov 2020 17:32:01 +0000 (18:32 +0100)]
Remove `expect()` calls to avoid ICEs in `deref_addrof` lint

3 years agoclippy: fold by value
Bastian Kauschke [Sat, 24 Oct 2020 00:21:27 +0000 (02:21 +0200)]
clippy: fold by value

3 years agoAuto merge of #6119 - rsulli55:find_is_some_on_strs, r=flip1995
bors [Mon, 16 Nov 2020 08:45:10 +0000 (08:45 +0000)]
Auto merge of #6119 - rsulli55:find_is_some_on_strs, r=flip1995

Add a case to `lint_search_is_some` to handle searching strings

Fixes: #6010
This adds a lint which recommends using `contains()` instead of `find()` followed by `is_some()` on strings as suggested in #6010.

This was added as an additional case to
https://github.com/rust-lang/rust-clippy/blob/5af88e3c2d8cc4fb74a0e455381669930ee3a31a/clippy_lints/src/methods/mod.rs#L3037

I would really appreciate any comments/suggestions for my code!

changelog: Added case to `lint_search_is_some` to handle searching strings

3 years agoAuto merge of #6336 - giraffate:sync-from-rust, r=flip1995
bors [Mon, 16 Nov 2020 08:23:27 +0000 (08:23 +0000)]
Auto merge of #6336 - giraffate:sync-from-rust, r=flip1995

Rustup

changelog: none