]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agoFix false positive in `PRECEDENCE` lint
Michael Wright [Thu, 20 Aug 2020 04:34:48 +0000 (06:34 +0200)]
Fix false positive in `PRECEDENCE` lint

Extend the lint to handle chains of methods combined with unary negation.

Closes #5924

3 years agoAuto merge of #5922 - flip1995:rustup, r=flip1995
bors [Tue, 18 Aug 2020 17:58:40 +0000 (17:58 +0000)]
Auto merge of #5922 - flip1995:rustup, r=flip1995

Rustup

r? @ghost

changelog: none

3 years agoMerge remote-tracking branch 'upstream/master' into rustup
flip1995 [Tue, 18 Aug 2020 17:10:52 +0000 (19:10 +0200)]
Merge remote-tracking branch 'upstream/master' into rustup

3 years agoAuto merge of #75120 - JulianKnodt:rm_reps, r=oli-obk
bors [Mon, 17 Aug 2020 23:16:08 +0000 (23:16 +0000)]
Auto merge of #75120 - JulianKnodt:rm_reps, r=oli-obk

rust_ast::ast => rustc_ast

Rework of #71199 which is a rework #70621

Still working on this but just made the PR to track progress

r? @Dylan-DPC

3 years agorust_ast::ast => rustc_ast
Ujjwal Sharma [Mon, 27 Apr 2020 17:56:11 +0000 (23:26 +0530)]
rust_ast::ast => rustc_ast

3 years agoAuto merge of #5908 - giraffate:fix_fp_for_same_item_push, r=flip1995
bors [Mon, 17 Aug 2020 16:49:03 +0000 (16:49 +0000)]
Auto merge of #5908 - giraffate:fix_fp_for_same_item_push, r=flip1995

Fix FP for `same_item_push`

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

changelog: Fix FP for `same_item_push` where the pushed variable is mutated.

3 years agoclippy: support `QPath::LangItem`
David Wood [Tue, 4 Aug 2020 13:24:13 +0000 (14:24 +0100)]
clippy: support `QPath::LangItem`

This commit updates clippy with the introduction of `QPath::LangItem` so
that it still compiles.

Signed-off-by: David Wood <david@davidtw.co>
3 years agoAuto merge of #5915 - matthiaskrgr:deps_, r=Manishearth
bors [Mon, 17 Aug 2020 12:23:44 +0000 (12:23 +0000)]
Auto merge of #5915 - matthiaskrgr:deps_, r=Manishearth

deps: bump cargo_metadata and semver

cargo_metadata 0.9.1 -> 0.11.1
semver 0.9.0 -> 0.10.0

changelog: none

3 years agodeps: bump cargo_metadata and semver
Matthias Krüger [Mon, 17 Aug 2020 10:19:32 +0000 (12:19 +0200)]
deps: bump cargo_metadata and semver

cargo_metadata 0.9.1 -> 0.11.1
semver 0.9.0 -> 0.10.0

3 years agoImprove code style
Takayuki Nakata [Sun, 16 Aug 2020 23:36:02 +0000 (08:36 +0900)]
Improve code style

3 years agoAuto merge of #5894 - tmiasko:self-assignment, r=Manishearth
bors [Sun, 16 Aug 2020 21:56:37 +0000 (21:56 +0000)]
Auto merge of #5894 - tmiasko:self-assignment, r=Manishearth

Warn about explicit self-assignment

Warn about assignments where left-hand side place expression is the same
as right-hand side value expression. For example, warn about assignment in:

```rust
pub struct Event {
    id: usize,
    x: i32,
    y: i32,
}

pub fn copy_position(a: &mut Event, b: &Event) {
    a.x = b.x;
    a.y = a.y;
}
```

changelog: New lint `self_assignment`, checks for explicit self-assignments.

3 years agoWarn about explicit self-assignment
Tomasz Miąsko [Sun, 16 Aug 2020 00:00:00 +0000 (00:00 +0000)]
Warn about explicit self-assignment

Warn about assignments where left-hand side place expression is the same
as right-hand side value expression. For example, warn about assignment in:

```rust
pub struct Event {
    id: usize,
    x: i32,
    y: i32,
}

pub fn copy_position(a: &mut Event, b: &Event) {
    a.x = b.x;
    a.y = a.y;
}
```

3 years agoExpresions with Assign / AssignOp have side effects
Tomasz Miąsko [Sun, 16 Aug 2020 00:00:00 +0000 (00:00 +0000)]
Expresions with Assign / AssignOp have side effects

3 years agoRename SpanlessEq::ignore_fn to deny_side_effects
Tomasz Miąsko [Sun, 16 Aug 2020 00:00:00 +0000 (00:00 +0000)]
Rename SpanlessEq::ignore_fn to deny_side_effects

No functional changes intended.

3 years agoIntroduce function for comparing expression values
Tomasz Miąsko [Sun, 16 Aug 2020 00:00:00 +0000 (00:00 +0000)]
Introduce function for comparing expression values

Introduce `eq_expr_value(cx, a, b)` as a shortcut for
`SpanlessEq::new(cx).ignore_fn().eq_expr(cx, a, b)`.

No functional changes intended.

3 years agoAuto merge of #5720 - bugadani:new-lint, r=flip1995,yaahc
bors [Sun, 16 Aug 2020 20:27:43 +0000 (20:27 +0000)]
Auto merge of #5720 - bugadani:new-lint, r=flip1995,yaahc

Add unnecessary lazy evaluation lint

changelog: Add [`unnecessary_lazy_evaluations`] lint that checks for usages of `unwrap_or_else` and similar functions that can be simplified.

Closes #5715

3 years agoRename lint to use plural form
Dániel Buga [Sun, 16 Aug 2020 20:16:39 +0000 (22:16 +0200)]
Rename lint to use plural form

3 years agoFix missed rename
Dániel Buga [Sun, 16 Aug 2020 19:33:29 +0000 (21:33 +0200)]
Fix missed rename

3 years agoAuto merge of #5913 - HactarCE:patch-1, r=flip1995
bors [Sun, 16 Aug 2020 19:27:27 +0000 (19:27 +0000)]
Auto merge of #5913 - HactarCE:patch-1, r=flip1995

Fix typo in description of unnecessary_mut_passed

changelog: Correct "immutable reference" to "mutable reference" in description of `unnecessary_mut_passed`

3 years agoFix dogfooding test errors
Dániel Buga [Sun, 16 Aug 2020 19:04:02 +0000 (21:04 +0200)]
Fix dogfooding test errors

3 years agorun cargo dev fmt
Dániel Buga [Sun, 16 Aug 2020 18:51:16 +0000 (20:51 +0200)]
run cargo dev fmt

3 years agoCleanup, explain return value
Dániel Buga [Sun, 16 Aug 2020 18:50:30 +0000 (20:50 +0200)]
Cleanup, explain return value

3 years agoMoved to submodule, don't trigger if map_unwrap_or does
Dániel Buga [Sun, 16 Aug 2020 18:47:50 +0000 (20:47 +0200)]
Moved to submodule, don't trigger if map_unwrap_or does

3 years agoFix typo in description of unnecessary_mut_passed
Hactar [Sun, 16 Aug 2020 18:43:34 +0000 (14:43 -0400)]
Fix typo in description of unnecessary_mut_passed

3 years agoApply suggested change
Dániel Buga [Sun, 26 Jul 2020 19:08:07 +0000 (21:08 +0200)]
Apply suggested change

Co-authored-by: Philipp Krones <hello@philkrones.com>
3 years agoApply suggested change
Dániel Buga [Sun, 26 Jul 2020 18:52:00 +0000 (20:52 +0200)]
Apply suggested change

Co-authored-by: Philipp Krones <hello@philkrones.com>
3 years agoRemoved the extra lifetime parameter
Dániel Buga [Sun, 26 Jul 2020 18:18:12 +0000 (20:18 +0200)]
Removed the extra lifetime parameter

3 years agoCatch function calls in argument lists, add tests that tuples don't get linted
Dániel Buga [Mon, 15 Jun 2020 18:01:18 +0000 (20:01 +0200)]
Catch function calls in argument lists, add tests that tuples don't get linted

3 years agoRun cargo dev update_lints
Dániel Buga [Mon, 15 Jun 2020 13:22:22 +0000 (15:22 +0200)]
Run cargo dev update_lints

3 years agoAlso simplify if the closure body is an index expression
Dániel Buga [Mon, 15 Jun 2020 13:26:02 +0000 (15:26 +0200)]
Also simplify if the closure body is an index expression

3 years agoAdd note to `or_fun_call`, list checked methods
Dániel Buga [Mon, 15 Jun 2020 12:55:23 +0000 (14:55 +0200)]
Add note to `or_fun_call`, list checked methods

3 years agoRename the changelog footnote as well
Dániel Buga [Mon, 15 Jun 2020 09:48:14 +0000 (11:48 +0200)]
Rename the changelog footnote as well

3 years agoImplement new lint
Dániel Buga [Mon, 15 Jun 2020 09:21:56 +0000 (11:21 +0200)]
Implement new lint

3 years agoAuto merge of #5725 - montrivo:should-impl-trait, r=flip1995
bors [Sun, 16 Aug 2020 17:51:18 +0000 (17:51 +0000)]
Auto merge of #5725 - montrivo:should-impl-trait, r=flip1995

should_impl_trait - ignore methods with lifetime params

Fixes: #5617
changelog: don't lint should_implement_trait when an `Iterator::next` case has explicit parameters

3 years agoAuto merge of #5907 - wiomoc:feature/useless-vec-max-size, r=flip1995
bors [Sun, 16 Aug 2020 17:30:12 +0000 (17:30 +0000)]
Auto merge of #5907 - wiomoc:feature/useless-vec-max-size, r=flip1995

appreciative too_large_for_stack in useless `vec!`

Fixes: #5847
changelog: Add `too_large_for_stack ` configuration option for `USELESS_VEC`

3 years agoAuto merge of #5903 - jrqc:needless_return, r=ebroto,flip1995
bors [Sun, 16 Aug 2020 17:08:45 +0000 (17:08 +0000)]
Auto merge of #5903 - jrqc:needless_return, r=ebroto,flip1995

Needless return

Fixes #5858
changelog: fix false positive [`needless_return`]

3 years agoAuto merge of #5881 - wiomoc:feature/single-char-push_str, r=ebroto,flip1995
bors [Sun, 16 Aug 2020 16:41:57 +0000 (16:41 +0000)]
Auto merge of #5881 - wiomoc:feature/single-char-push_str, r=ebroto,flip1995

Lint `push_str` with a single-character string literal

Fixes #5875
changelog:  `* [single_char_push_str]`

3 years agoAuto merge of #5831 - chansuke:to_string_in_display, r=flip1995
bors [Sun, 16 Aug 2020 16:21:37 +0000 (16:21 +0000)]
Auto merge of #5831 - chansuke:to_string_in_display, r=flip1995

Don't use `to_string` in impl Display

fixes #3876

this PR is derived from [Toxyxer's implementation](https://github.com/rust-lang/rust-clippy/pull/5574).
changelog: add [`to_string_in_display`] lint

3 years agoAuto merge of #5912 - ebroto:needless_doctest_main_improvements, r=Manishearth,flip1995
bors [Sun, 16 Aug 2020 15:57:18 +0000 (15:57 +0000)]
Auto merge of #5912 - ebroto:needless_doctest_main_improvements, r=Manishearth,flip1995

Parse doctests in needless_doctest_main

This switches from text-based search to running the parser to avoid false positives. Inspired by how [rustdoc](https://github.com/rust-lang/rust/blob/3f3250500fe152b5759c21453ba9a9129808d0d8/src/librustdoc/test.rs#L366) handles this and by #4729.

cc @llogiq

changelog: Fix multiple false positives in [`needless_doctest_main`].

Fixes #5879
Fixes #4906
Fixes #5103
Fixes #4698

3 years agoImprove needless_doctest_main by using the parser
Eduardo Broto [Sat, 15 Aug 2020 22:25:54 +0000 (00:25 +0200)]
Improve needless_doctest_main by using the parser

3 years agoearly return removed
jrqc [Fri, 14 Aug 2020 06:25:26 +0000 (09:25 +0300)]
early return removed

3 years agocargo dev update_lints
jrqc [Thu, 13 Aug 2020 16:30:49 +0000 (19:30 +0300)]
cargo dev update_lints

3 years agoModifications according to the code review
jrqc [Thu, 13 Aug 2020 16:24:34 +0000 (19:24 +0300)]
Modifications according to the code review

3 years agoKnown problems changed
jrqc [Thu, 13 Aug 2020 12:21:09 +0000 (15:21 +0300)]
Known problems changed

3 years agoBorrow checker added
jrqc [Thu, 13 Aug 2020 12:14:08 +0000 (15:14 +0300)]
Borrow checker added

3 years agoVisitor added
jrqc [Wed, 12 Aug 2020 14:14:12 +0000 (17:14 +0300)]
Visitor added

3 years agoMake needless_return a late lint pass
jrqc [Wed, 12 Aug 2020 12:43:44 +0000 (15:43 +0300)]
Make needless_return a late lint pass

3 years agoAuto merge of #5910 - flip1995:rustup, r=flip1995
bors [Sat, 15 Aug 2020 12:05:11 +0000 (12:05 +0000)]
Auto merge of #5910 - flip1995:rustup, r=flip1995

Rustup

r? @ghost

changelog: none

3 years agoelide lifetimes
Christoph Walcher [Fri, 14 Aug 2020 23:40:47 +0000 (01:40 +0200)]
elide lifetimes

3 years agoMerge lint with `single_char_pattern`
Christoph Walcher [Fri, 14 Aug 2020 10:52:19 +0000 (12:52 +0200)]
Merge lint with `single_char_pattern`

3 years agoLint `push_str` with a single-character string literal
Christoph Walcher [Sun, 9 Aug 2020 15:47:11 +0000 (17:47 +0200)]
Lint `push_str` with a single-character string literal

Fixes #5875

3 years agoFix FP for `same_item_push`
Takayuki Nakata [Fri, 14 Aug 2020 13:54:12 +0000 (22:54 +0900)]
Fix FP for `same_item_push`

Don't emit a lint when `pushed_item` was declared as mutable variable.

3 years agoDon't use `to_string` in impl Display
chansuke [Wed, 22 Jul 2020 12:44:53 +0000 (21:44 +0900)]
Don't use `to_string` in impl Display

3 years agoappreciative too_large_for_stack in useless `vec!`
Christoph Walcher [Fri, 14 Aug 2020 12:13:35 +0000 (14:13 +0200)]
appreciative too_large_for_stack in useless `vec!`

Fixes: #5847
3 years agoAuto merge of #5905 - ErichDonGubler:patch-1, r=flip1995
bors [Thu, 13 Aug 2020 19:54:48 +0000 (19:54 +0000)]
Auto merge of #5905 - ErichDonGubler:patch-1, r=flip1995

docs: typo in `temporary_cstring_as_ptr`: s/point/&s

changelog: none

3 years agodocs: typo in `temporary_cstring_as_ptr`: s/point/&s
Erich Gubler [Thu, 13 Aug 2020 19:52:21 +0000 (13:52 -0600)]
docs: typo in `temporary_cstring_as_ptr`: s/point/&s

3 years agomerge `as_local_hir_id` with `local_def_id_to_hir_id`
Bastian Kauschke [Wed, 12 Aug 2020 10:22:56 +0000 (12:22 +0200)]
merge `as_local_hir_id` with `local_def_id_to_hir_id`

3 years agoAuto merge of #5901 - giraffate:add_reference_to_rustc_dev_guide, r=matthiaskrgr
bors [Thu, 13 Aug 2020 13:54:53 +0000 (13:54 +0000)]
Auto merge of #5901 - giraffate:add_reference_to_rustc_dev_guide, r=matthiaskrgr

Add reference to rustc-dev-guide about lint message

I think it would be better to add lint message convention to documentation. I referred to https://github.com/rust-lang/rust-clippy/pull/5888 and https://github.com/rust-lang/rust-clippy/pull/5893.

changelog: none

3 years agoAuto merge of #5899 - JarredAllen:rc-box-suggestion, r=yaahc
bors [Thu, 13 Aug 2020 13:31:55 +0000 (13:31 +0000)]
Auto merge of #5899 - JarredAllen:rc-box-suggestion, r=yaahc

Change Rc<Box<T>> recommendation to be Rc<T> instead of Box<T>

Fixes #5722

changelog: Suggest `Rc<Box<T>>` -> `Rc<T>` in [`redundant_allocation`] lint

3 years agoAuto merge of #5900 - ThibsG:ParensUselessConversion4750, r=phansch
bors [Thu, 13 Aug 2020 05:27:29 +0000 (05:27 +0000)]
Auto merge of #5900 - ThibsG:ParensUselessConversion4750, r=phansch

Fix: keep parenthesis for suggestion in `useless_conversion` lint

Note: this lint was previously named `identity_conversion`.

fixes: #4750

changelog: fix parenthesis for `useless_conversion` lint suggestion

3 years agoAdd reference to rustc-dev-guide about lint message
Takayuki Nakata [Thu, 13 Aug 2020 00:02:49 +0000 (09:02 +0900)]
Add reference to rustc-dev-guide about lint message

3 years agoReplace panics with early returns
JarredAllen [Wed, 12 Aug 2020 20:24:55 +0000 (13:24 -0700)]
Replace panics with early returns

3 years agoFix: keep parenthesis for suggestion in `useless_conversion` lint
ThibsG [Wed, 12 Aug 2020 19:37:27 +0000 (21:37 +0200)]
Fix: keep parenthesis for suggestion in `useless_conversion` lint

3 years agoAuto merge of #5897 - matthiaskrgr:no_clone_tts, r=flip1995
bors [Wed, 12 Aug 2020 17:36:23 +0000 (17:36 +0000)]
Auto merge of #5897 - matthiaskrgr:no_clone_tts, r=flip1995

write.rs: don't clone TokenStream

changelog: none

3 years agoChange Rc<Box<T>> recommendation to be Rc<T> instead of Box<T>
JarredAllen [Wed, 12 Aug 2020 01:01:10 +0000 (18:01 -0700)]
Change Rc<Box<T>> recommendation to be Rc<T> instead of Box<T>

3 years agoAuto merge of #5884 - Ryan1729:patch-1, r=flip1995
bors [Wed, 12 Aug 2020 17:00:48 +0000 (17:00 +0000)]
Auto merge of #5884 - Ryan1729:patch-1, r=flip1995

Add the other overloadable operations to suspicious_arithmetic_impl

In #2268 I idly mused that the other user-overloadable operations could be added to this lint. Knowing that the lint was arguably incomplete was gnawing at the back of my mind, so I figured that I might as well make this PR, particularly given the change needed was so small.

changelog: Start warning on suspicious implementations of the `BitAnd`, `BitOr`, `BitXor`, `Rem`, `Shl`, and `Shr` traits.

3 years agorun tests/ui/update-references.sh to update 'suspicious_arithmetic_impl.rs'
Ryan1729 [Wed, 12 Aug 2020 16:49:12 +0000 (10:49 -0600)]
run tests/ui/update-references.sh to update 'suspicious_arithmetic_impl.rs'

3 years agoAuto merge of #5893 - matthiaskrgr:lint_msg, r=yaahc
bors [Wed, 12 Aug 2020 16:33:57 +0000 (16:33 +0000)]
Auto merge of #5893 - matthiaskrgr:lint_msg, r=yaahc

fix remaining lint messages

r? @yaahc

changelog:  make remaining lint messages adhere to rustc dev guide lint message convention.

3 years agoadd tests for Rem, BitAnd, BitOr, BitXor, Shl, and Shr
Ryan1729 [Wed, 12 Aug 2020 15:17:40 +0000 (09:17 -0600)]
add tests for Rem, BitAnd, BitOr, BitXor, Shl, and Shr

3 years agotrailing comma
Ryan Wiedemann [Mon, 10 Aug 2020 15:21:20 +0000 (09:21 -0600)]
trailing comma

Should have actually ran rustfmt on it, rather than attempting to fix it manually

3 years agoformatting
Ryan Wiedemann [Mon, 10 Aug 2020 15:18:16 +0000 (09:18 -0600)]
formatting

3 years agoAdd the other overloadable operations to suspicious_arithmetic_impl
Ryan Wiedemann [Mon, 10 Aug 2020 13:30:55 +0000 (07:30 -0600)]
Add the other overloadable operations to suspicious_arithmetic_impl

In #2268 I idly mused that the other user-overloadable operations could be added to this lint. Knowing that the lint was arguably incomplete was gnawing at the back of my mind, so I figured that I might as well make this PR, particularly given the change needed was so small.

3 years agoAuto merge of #5885 - Ryan1729:patch-2, r=flip1995
bors [Wed, 12 Aug 2020 15:51:39 +0000 (15:51 +0000)]
Auto merge of #5885 - Ryan1729:patch-2, r=flip1995

Add example of false positive to PTR_ARG docs.

Addresses #214

changelog: Add example of false positive to `ptr_arg` docs.

3 years agoAuto merge of #5898 - flip1995:rustup, r=flip1995
bors [Wed, 12 Aug 2020 15:11:25 +0000 (15:11 +0000)]
Auto merge of #5898 - flip1995:rustup, r=flip1995

Rustup

r? @ghost

changelog: none

3 years agoMerge remote-tracking branch 'upstream/master' into rustup
flip1995 [Wed, 12 Aug 2020 15:03:54 +0000 (17:03 +0200)]
Merge remote-tracking branch 'upstream/master' into rustup

3 years agofix typo pointed out in review comment
Ryan Wiedemann [Wed, 12 Aug 2020 14:54:32 +0000 (08:54 -0600)]
fix typo pointed out in review comment

Co-authored-by: Philipp Krones <hello@philkrones.com>
3 years agowrite.rs: don't clone TokenStream
Matthias Krüger [Wed, 12 Aug 2020 12:27:06 +0000 (14:27 +0200)]
write.rs: don't clone TokenStream

3 years agoAuto merge of #75405 - flip1995:clippyup, r=Manishearth
bors [Wed, 12 Aug 2020 00:34:19 +0000 (00:34 +0000)]
Auto merge of #75405 - flip1995:clippyup, r=Manishearth

Update Clippy

Biweekly Clippy update (2 days late, since I wanted to wait for https://github.com/rust-lang/rust/pull/75098)

r? @Manishearth

3 years agoMerge commit '09bd400243ed6f7059fedc0c1623aae3792521d6' into clippyup
flip1995 [Tue, 11 Aug 2020 13:43:21 +0000 (15:43 +0200)]
Merge commit '09bd400243ed6f7059fedc0c1623aae3792521d6' into clippyup

3 years agoif_not_else: make lint adhere to lint message convention
Matthias Krüger [Tue, 11 Aug 2020 14:43:53 +0000 (16:43 +0200)]
if_not_else: make lint adhere to lint message convention

3 years agoif_let_some_result: make lint adhere to lint message convention
Matthias Krüger [Tue, 11 Aug 2020 14:40:45 +0000 (16:40 +0200)]
if_let_some_result: make lint adhere to lint message convention

3 years agoenum-variant-names: make lint adhere to lint message convention
Matthias Krüger [Tue, 11 Aug 2020 14:38:20 +0000 (16:38 +0200)]
enum-variant-names: make lint adhere to lint message convention

3 years agoenum-clike-unportable-variant: tweak message a bit (Clike -> C-like)
Matthias Krüger [Tue, 11 Aug 2020 14:35:09 +0000 (16:35 +0200)]
enum-clike-unportable-variant: tweak message a bit (Clike -> C-like)

3 years agoduration-subsec: make lint adhere to lint message convention
Matthias Krüger [Tue, 11 Aug 2020 14:31:02 +0000 (16:31 +0200)]
duration-subsec: make lint adhere to lint message convention

3 years agopub-enum-variant-names: make lint adhere to lint message convention
Matthias Krüger [Tue, 11 Aug 2020 14:28:05 +0000 (16:28 +0200)]
pub-enum-variant-names: make lint adhere to lint message convention

3 years agomultiple_inherent_impl: make lint adhere to lint message convention
Matthias Krüger [Tue, 11 Aug 2020 13:28:51 +0000 (15:28 +0200)]
multiple_inherent_impl: make lint adhere to lint message convention

3 years agoimplicit-saturating-sub: make lint adhere to lint message convention
Matthias Krüger [Tue, 11 Aug 2020 13:22:59 +0000 (15:22 +0200)]
implicit-saturating-sub: make lint adhere to lint message convention

3 years agoint_plus_one: make lint adhere to lint message convention
Matthias Krüger [Tue, 11 Aug 2020 13:14:32 +0000 (15:14 +0200)]
int_plus_one: make lint adhere to lint message convention

3 years agoiter-next-slice: make lint adhere to lint message convention
Matthias Krüger [Tue, 11 Aug 2020 10:42:50 +0000 (12:42 +0200)]
iter-next-slice: make lint adhere to lint message convention

3 years agomutex-atomic: make lint adhere to lint message convention
Matthias Krüger [Tue, 11 Aug 2020 10:10:42 +0000 (12:10 +0200)]
mutex-atomic: make lint adhere to lint message convention

3 years agomap_clone: make lint adhere to lint message convention
Matthias Krüger [Tue, 11 Aug 2020 09:53:21 +0000 (11:53 +0200)]
map_clone: make lint adhere to lint message convention

3 years agostable-sort-primitive: make lint adhere to lint message convention
Matthias Krüger [Tue, 11 Aug 2020 09:50:26 +0000 (11:50 +0200)]
stable-sort-primitive: make lint adhere to lint message convention

3 years agoAuto merge of #5892 - matthiaskrgr:redundant_mut, r=flip1995
bors [Tue, 11 Aug 2020 12:52:41 +0000 (12:52 +0000)]
Auto merge of #5892 - matthiaskrgr:redundant_mut, r=flip1995

unnecessary-mut-passed: make lint message say if fn is a function or a method

changelog: refine "unnecessary-mut-passed" lint message

3 years agoAuto merge of #5891 - flip1995:rustup, r=flip1995
bors [Tue, 11 Aug 2020 12:32:10 +0000 (12:32 +0000)]
Auto merge of #5891 - flip1995:rustup, r=flip1995

Rustup

r? @ghost

Sync back rust-lang/rust#75098

changelog: none

3 years agoFix sync fallout
flip1995 [Tue, 11 Aug 2020 11:57:32 +0000 (13:57 +0200)]
Fix sync fallout

3 years agounnecessary-mut-passed: make lint message say if fn is a function or a method.
Matthias Krüger [Tue, 11 Aug 2020 10:35:55 +0000 (12:35 +0200)]
unnecessary-mut-passed: make lint message say if fn is a function or a method.

3 years agoRollup merge of #75226 - pnadon:miri-undef-uninit, r=RalfJung
Yuki Okushi [Tue, 11 Aug 2020 07:23:47 +0000 (16:23 +0900)]
Rollup merge of #75226 - pnadon:miri-undef-uninit, r=RalfJung

Miri: Renamed "undef" to "uninit"

Renamed remaining references to "undef" to "uninit" when referring to Miri.

Impacted directories are:

- `src/librustc_codegen_llvm/consts.rs`
- `src/librustc_middle/mir/interpret/`
- `src/librustc_middle/ty/print/pretty.rs`
- `src/librustc_mir/`
- `src/tools/clippy/clippy_lints/src/consts.rs`

Upon building Miri based on the new changes it was verified that no changes needed to be made with the Miri project.

Related issue #71193

3 years agoRollup merge of #75098 - Ryan1729:clippy-pointer-cast-lint-experiment, r=oli-obk
Dylan DPC [Mon, 10 Aug 2020 23:56:30 +0000 (01:56 +0200)]
Rollup merge of #75098 - Ryan1729:clippy-pointer-cast-lint-experiment, r=oli-obk

Clippy pointer cast lint experiment

This PR is an experiment about exposing more parts of `rustc_typeck` for use in `clippy`. In particular, the code that checks where a cast is valid or not was exposed, which necessitated exposing [`FnCtxt`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_typeck/check/struct.FnCtxt.html), and figuring out how to create an instance of that type inside `clippy`.

This was prompted by [this clippy issue](https://github.com/rust-lang/rust-clippy/issues/2064).

r? @oli-obk

3 years agoAuto merge of #5888 - matthiaskrgr:lints, r=yaahc
bors [Mon, 10 Aug 2020 22:40:42 +0000 (22:40 +0000)]
Auto merge of #5888 - matthiaskrgr:lints, r=yaahc

make a bunch of lints texts adhere to rustc dev guide

According to the rustc-dev guide: "The text should be matter of fact and avoid capitalization and periods, unless multiple sentences are needed"

changelog: make some lint output adhere to the rustc-dev guide

3 years agoupdate test stderr
Matthias Krüger [Mon, 10 Aug 2020 22:27:55 +0000 (00:27 +0200)]
update test stderr