Skip to content

Commit 51b633b

Browse files
committed
Auto merge of #6371 - ebroto:rustup, r=ebroto
Rustup changelog: none r? `@ghost`
2 parents 58a2bc4 + 209ab18 commit 51b633b

5 files changed

+14
-35
lines changed

clippy_lints/src/attrs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ static UNIX_SYSTEMS: &[&str] = &[
4040
];
4141

4242
// NOTE: windows is excluded from the list because it's also a valid target family.
43-
static NON_UNIX_SYSTEMS: &[&str] = &["cloudabi", "hermit", "none", "wasi"];
43+
static NON_UNIX_SYSTEMS: &[&str] = &["hermit", "none", "wasi"];
4444

4545
declare_clippy_lint! {
4646
/// **What it does:** Checks for items annotated with `#[inline(always)]`,

clippy_lints/src/future_not_send.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ impl<'tcx> LateLintPass<'tcx> for FutureNotSend {
6868
for &(p, _span) in preds {
6969
let p = p.subst(cx.tcx, subst);
7070
if let Some(trait_ref) = p.to_opt_poly_trait_ref() {
71-
if Some(trait_ref.def_id()) == cx.tcx.lang_items().future_trait() {
71+
if Some(trait_ref.value.def_id()) == cx.tcx.lang_items().future_trait() {
7272
is_future = true;
7373
break;
7474
}

tests/ui/mismatched_target_os_non_unix.fixed

+1-4
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
#![warn(clippy::mismatched_target_os)]
44
#![allow(unused)]
55

6-
#[cfg(target_os = "cloudabi")]
7-
fn cloudabi() {}
8-
96
#[cfg(target_os = "hermit")]
107
fn hermit() {}
118

@@ -16,7 +13,7 @@ fn wasi() {}
1613
fn none() {}
1714

1815
// list with conditions
19-
#[cfg(all(not(any(windows, target_os = "cloudabi")), target_os = "wasi"))]
16+
#[cfg(all(not(windows), target_os = "wasi"))]
2017
fn list() {}
2118

2219
// windows is a valid target family, should be ignored

tests/ui/mismatched_target_os_non_unix.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
#![warn(clippy::mismatched_target_os)]
44
#![allow(unused)]
55

6-
#[cfg(cloudabi)]
7-
fn cloudabi() {}
8-
96
#[cfg(hermit)]
107
fn hermit() {}
118

@@ -16,7 +13,7 @@ fn wasi() {}
1613
fn none() {}
1714

1815
// list with conditions
19-
#[cfg(all(not(any(windows, cloudabi)), wasi))]
16+
#[cfg(all(not(windows), wasi))]
2017
fn list() {}
2118

2219
// windows is a valid target family, should be ignored
+10-25
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,36 @@
11
error: operating system used in target family position
22
--> $DIR/mismatched_target_os_non_unix.rs:6:1
33
|
4-
LL | #[cfg(cloudabi)]
5-
| ^^^^^^--------^^
6-
| |
7-
| help: try: `target_os = "cloudabi"`
8-
|
9-
= note: `-D clippy::mismatched-target-os` implied by `-D warnings`
10-
11-
error: operating system used in target family position
12-
--> $DIR/mismatched_target_os_non_unix.rs:9:1
13-
|
144
LL | #[cfg(hermit)]
155
| ^^^^^^------^^
166
| |
177
| help: try: `target_os = "hermit"`
8+
|
9+
= note: `-D clippy::mismatched-target-os` implied by `-D warnings`
1810

1911
error: operating system used in target family position
20-
--> $DIR/mismatched_target_os_non_unix.rs:12:1
12+
--> $DIR/mismatched_target_os_non_unix.rs:9:1
2113
|
2214
LL | #[cfg(wasi)]
2315
| ^^^^^^----^^
2416
| |
2517
| help: try: `target_os = "wasi"`
2618

2719
error: operating system used in target family position
28-
--> $DIR/mismatched_target_os_non_unix.rs:15:1
20+
--> $DIR/mismatched_target_os_non_unix.rs:12:1
2921
|
3022
LL | #[cfg(none)]
3123
| ^^^^^^----^^
3224
| |
3325
| help: try: `target_os = "none"`
3426

3527
error: operating system used in target family position
36-
--> $DIR/mismatched_target_os_non_unix.rs:19:1
37-
|
38-
LL | #[cfg(all(not(any(windows, cloudabi)), wasi))]
39-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
40-
|
41-
help: try
42-
|
43-
LL | #[cfg(all(not(any(windows, target_os = "cloudabi")), wasi))]
44-
| ^^^^^^^^^^^^^^^^^^^^^^
45-
help: try
28+
--> $DIR/mismatched_target_os_non_unix.rs:16:1
4629
|
47-
LL | #[cfg(all(not(any(windows, cloudabi)), target_os = "wasi"))]
48-
| ^^^^^^^^^^^^^^^^^^
30+
LL | #[cfg(all(not(windows), wasi))]
31+
| ^^^^^^^^^^^^^^^^^^^^^^^^----^^^
32+
| |
33+
| help: try: `target_os = "wasi"`
4934

50-
error: aborting due to 5 previous errors
35+
error: aborting due to 4 previous errors
5136

0 commit comments

Comments
 (0)