Skip to content

Commit 0ab8b9e

Browse files
committed
Auto merge of #7418 - flip1995:rustup, r=flip1995
Rustup r? `@ghost` changelog: none
2 parents 753bce3 + adc933f commit 0ab8b9e

File tree

14 files changed

+34
-36
lines changed

14 files changed

+34
-36
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ We have prioritization labels and a sync-blocker label, which are described belo
342342
- [P-low][p-low]: Requires attention (fix/response/evaluation) by a team member but isn't urgent.
343343
- [P-medium][p-medium]: Should be addressed by a team member until the next sync.
344344
- [P-high][p-high]: Should be immediately addressed and will require an out-of-cycle sync or a backport.
345-
- [L-sync-blocker][l-sync-blocker]: An issue that "blocks" a sync.
345+
- [L-sync-blocker][l-sync-blocker]: An issue that "blocks" a sync.
346346
Or rather: before the sync this should be addressed,
347347
e.g. by removing a lint again, so it doesn't hit beta/stable.
348348

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ As with `cargo check`, this includes dependencies that are members of the worksp
9595
If you want to run Clippy **only** on the given crate, use the `--no-deps` option like this:
9696

9797
```terminal
98-
cargo clippy -p example -- --no-deps
98+
cargo clippy -p example -- --no-deps
9999
```
100100

101101
### As a rustc replacement (`clippy-driver`)

clippy_lints/src/derive.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -411,9 +411,7 @@ impl<'tcx> Visitor<'tcx> for UnsafeVisitor<'_, 'tcx> {
411411

412412
if let ExprKind::Block(block, _) = expr.kind {
413413
match block.rules {
414-
BlockCheckMode::UnsafeBlock(UnsafeSource::UserProvided)
415-
| BlockCheckMode::PushUnsafeBlock(UnsafeSource::UserProvided)
416-
| BlockCheckMode::PopUnsafeBlock(UnsafeSource::UserProvided) => {
414+
BlockCheckMode::UnsafeBlock(UnsafeSource::UserProvided) => {
417415
self.has_unsafe = true;
418416
},
419417
_ => {},

doc/basics.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ cargo dev setup intellij
9898

9999
## lintcheck
100100
`cargo lintcheck` will build and run clippy on a fixed set of crates and generate a log of the results.
101-
You can `git diff` the updated log against its previous version and
101+
You can `git diff` the updated log against its previous version and
102102
see what impact your lint made on a small set of crates.
103-
If you add a new lint, please audit the resulting warnings and make sure
103+
If you add a new lint, please audit the resulting warnings and make sure
104104
there are no false positives and that the suggestions are valid.
105105

106106
Refer to the tools [README] for more details.

lintcheck/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,5 +73,5 @@ You can run `./lintcheck/target/debug/lintcheck --fix` which will run Clippy wit
7373
print a warning if Clippys suggestions fail to apply (if the resulting code does not build).
7474
This lets us spot bad suggestions or false positives automatically in some cases.
7575

76-
Please note that the target dir should be cleaned afterwards since clippy will modify
76+
Please note that the target dir should be cleaned afterwards since clippy will modify
7777
the downloaded sources which can lead to unexpected results when running lintcheck again afterwards.

rust-toolchain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "nightly-2021-06-17"
2+
channel = "nightly-2021-07-01"
33
components = ["llvm-tools-preview", "rustc-dev", "rust-src"]

tests/ui/bytes_nth.fixed

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
fn main() {
77
let s = String::from("String");
88
s.as_bytes().get(3);
9-
&s.as_bytes().get(3);
9+
let _ = &s.as_bytes().get(3);
1010
s[..].as_bytes().get(3);
1111
}

tests/ui/bytes_nth.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
fn main() {
77
let s = String::from("String");
88
s.bytes().nth(3);
9-
&s.bytes().nth(3);
9+
let _ = &s.bytes().nth(3);
1010
s[..].bytes().nth(3);
1111
}

tests/ui/bytes_nth.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ LL | s.bytes().nth(3);
77
= note: `-D clippy::bytes-nth` implied by `-D warnings`
88

99
error: called `.byte().nth()` on a `String`
10-
--> $DIR/bytes_nth.rs:9:6
10+
--> $DIR/bytes_nth.rs:9:14
1111
|
12-
LL | &s.bytes().nth(3);
13-
| ^^^^^^^^^^^^^^^^ help: try: `s.as_bytes().get(3)`
12+
LL | let _ = &s.bytes().nth(3);
13+
| ^^^^^^^^^^^^^^^^ help: try: `s.as_bytes().get(3)`
1414

1515
error: called `.byte().nth()` on a `str`
1616
--> $DIR/bytes_nth.rs:10:5

tests/ui/crashes/ice-3969.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | for<'a> Dst<A + 'a>: Sized,
55
| ^^^^^^ help: use `dyn`: `dyn A + 'a`
66
|
77
= note: `-D bare-trait-objects` implied by `-D warnings`
8-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition!
8+
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
99
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
1010

1111
error: trait objects without an explicit `dyn` are deprecated
@@ -14,7 +14,7 @@ error: trait objects without an explicit `dyn` are deprecated
1414
LL | let x: Dst<A> = *(Box::new(Dst { x: 1 }) as Box<Dst<A>>);
1515
| ^ help: use `dyn`: `dyn A`
1616
|
17-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition!
17+
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
1818
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
1919

2020
error: trait objects without an explicit `dyn` are deprecated
@@ -23,7 +23,7 @@ error: trait objects without an explicit `dyn` are deprecated
2323
LL | let x: Dst<A> = *(Box::new(Dst { x: 1 }) as Box<Dst<A>>);
2424
| ^ help: use `dyn`: `dyn A`
2525
|
26-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition!
26+
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
2727
= note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
2828

2929
error: aborting due to 3 previous errors

0 commit comments

Comments
 (0)