Skip to content

Commit ead68f0

Browse files
committed
Fix clippy tests
1 parent 76cd709 commit ead68f0

File tree

6 files changed

+33
-32
lines changed

6 files changed

+33
-32
lines changed

Diff for: src/tools/clippy/tests/ui/asm_syntax.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
// only-x86_64
22
// ignore-aarch64
33

4-
#![feature(asm)]
5-
64
#[warn(clippy::inline_asm_x86_intel_syntax)]
75
mod warn_intel {
86
pub(super) unsafe fn use_asm() {
7+
use std::arch::asm;
98
asm!("");
109
asm!("", options());
1110
asm!("", options(nostack));
@@ -17,6 +16,7 @@ mod warn_intel {
1716
#[warn(clippy::inline_asm_x86_att_syntax)]
1817
mod warn_att {
1918
pub(super) unsafe fn use_asm() {
19+
use std::arch::asm;
2020
asm!("");
2121
asm!("", options());
2222
asm!("", options(nostack));

Diff for: src/tools/clippy/tests/ui/asm_syntax.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: Intel x86 assembly syntax used
2-
--> $DIR/asm_syntax.rs:9:9
2+
--> $DIR/asm_syntax.rs:8:9
33
|
44
LL | asm!("");
55
| ^^^^^^^^
@@ -8,15 +8,15 @@ LL | asm!("");
88
= help: use AT&T x86 assembly syntax
99

1010
error: Intel x86 assembly syntax used
11-
--> $DIR/asm_syntax.rs:10:9
11+
--> $DIR/asm_syntax.rs:9:9
1212
|
1313
LL | asm!("", options());
1414
| ^^^^^^^^^^^^^^^^^^^
1515
|
1616
= help: use AT&T x86 assembly syntax
1717

1818
error: Intel x86 assembly syntax used
19-
--> $DIR/asm_syntax.rs:11:9
19+
--> $DIR/asm_syntax.rs:10:9
2020
|
2121
LL | asm!("", options(nostack));
2222
| ^^^^^^^^^^^^^^^^^^^^^^^^^^

Diff for: src/tools/clippy/tests/ui/entry.fixed

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
#![allow(unused, clippy::needless_pass_by_value, clippy::collapsible_if)]
44
#![warn(clippy::map_entry)]
5-
#![feature(asm)]
65

6+
use std::arch::asm;
77
use std::collections::HashMap;
88
use std::hash::Hash;
99

Diff for: src/tools/clippy/tests/ui/entry.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
#![allow(unused, clippy::needless_pass_by_value, clippy::collapsible_if)]
44
#![warn(clippy::map_entry)]
5-
#![feature(asm)]
65

6+
use std::arch::asm;
77
use std::collections::HashMap;
88
use std::hash::Hash;
99

Diff for: src/tools/clippy/tests/ui/missing-doc.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
// When denying at the crate level, be sure to not get random warnings from the
33
// injected intrinsics by the compiler.
44
#![allow(dead_code)]
5-
#![feature(global_asm)]
65
//! Some garbage docs for the crate here
76
#![doc = "More garbage"]
87

8+
use std::arch::global_asm;
9+
910
type Typedef = String;
1011
pub type PubTypedef = String;
1112

Diff for: src/tools/clippy/tests/ui/missing-doc.stderr

+24-24
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
11
error: missing documentation for a type alias
2-
--> $DIR/missing-doc.rs:9:1
2+
--> $DIR/missing-doc.rs:10:1
33
|
44
LL | type Typedef = String;
55
| ^^^^^^^^^^^^^^^^^^^^^^
66
|
77
= note: `-D clippy::missing-docs-in-private-items` implied by `-D warnings`
88

99
error: missing documentation for a type alias
10-
--> $DIR/missing-doc.rs:10:1
10+
--> $DIR/missing-doc.rs:11:1
1111
|
1212
LL | pub type PubTypedef = String;
1313
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1414

1515
error: missing documentation for a module
16-
--> $DIR/missing-doc.rs:12:1
16+
--> $DIR/missing-doc.rs:13:1
1717
|
1818
LL | mod module_no_dox {}
1919
| ^^^^^^^^^^^^^^^^^^^^
2020

2121
error: missing documentation for a module
22-
--> $DIR/missing-doc.rs:13:1
22+
--> $DIR/missing-doc.rs:14:1
2323
|
2424
LL | pub mod pub_module_no_dox {}
2525
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2626

2727
error: missing documentation for a function
28-
--> $DIR/missing-doc.rs:17:1
28+
--> $DIR/missing-doc.rs:18:1
2929
|
3030
LL | pub fn foo2() {}
3131
| ^^^^^^^^^^^^^^^^
3232

3333
error: missing documentation for a function
34-
--> $DIR/missing-doc.rs:18:1
34+
--> $DIR/missing-doc.rs:19:1
3535
|
3636
LL | fn foo3() {}
3737
| ^^^^^^^^^^^^
3838

3939
error: missing documentation for an enum
40-
--> $DIR/missing-doc.rs:32:1
40+
--> $DIR/missing-doc.rs:33:1
4141
|
4242
LL | / enum Baz {
4343
LL | | BazA { a: isize, b: isize },
@@ -46,75 +46,75 @@ LL | | }
4646
| |_^
4747

4848
error: missing documentation for a variant
49-
--> $DIR/missing-doc.rs:33:5
49+
--> $DIR/missing-doc.rs:34:5
5050
|
5151
LL | BazA { a: isize, b: isize },
5252
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
5353

5454
error: missing documentation for a struct field
55-
--> $DIR/missing-doc.rs:33:12
55+
--> $DIR/missing-doc.rs:34:12
5656
|
5757
LL | BazA { a: isize, b: isize },
5858
| ^^^^^^^^
5959

6060
error: missing documentation for a struct field
61-
--> $DIR/missing-doc.rs:33:22
61+
--> $DIR/missing-doc.rs:34:22
6262
|
6363
LL | BazA { a: isize, b: isize },
6464
| ^^^^^^^^
6565

6666
error: missing documentation for a variant
67-
--> $DIR/missing-doc.rs:34:5
67+
--> $DIR/missing-doc.rs:35:5
6868
|
6969
LL | BarB,
7070
| ^^^^
7171

7272
error: missing documentation for an enum
73-
--> $DIR/missing-doc.rs:37:1
73+
--> $DIR/missing-doc.rs:38:1
7474
|
7575
LL | / pub enum PubBaz {
7676
LL | | PubBazA { a: isize },
7777
LL | | }
7878
| |_^
7979

8080
error: missing documentation for a variant
81-
--> $DIR/missing-doc.rs:38:5
81+
--> $DIR/missing-doc.rs:39:5
8282
|
8383
LL | PubBazA { a: isize },
8484
| ^^^^^^^^^^^^^^^^^^^^
8585

8686
error: missing documentation for a struct field
87-
--> $DIR/missing-doc.rs:38:15
87+
--> $DIR/missing-doc.rs:39:15
8888
|
8989
LL | PubBazA { a: isize },
9090
| ^^^^^^^^
9191

9292
error: missing documentation for a constant
93-
--> $DIR/missing-doc.rs:58:1
93+
--> $DIR/missing-doc.rs:59:1
9494
|
9595
LL | const FOO: u32 = 0;
9696
| ^^^^^^^^^^^^^^^^^^^
9797

9898
error: missing documentation for a constant
99-
--> $DIR/missing-doc.rs:65:1
99+
--> $DIR/missing-doc.rs:66:1
100100
|
101101
LL | pub const FOO4: u32 = 0;
102102
| ^^^^^^^^^^^^^^^^^^^^^^^^
103103

104104
error: missing documentation for a static
105-
--> $DIR/missing-doc.rs:67:1
105+
--> $DIR/missing-doc.rs:68:1
106106
|
107107
LL | static BAR: u32 = 0;
108108
| ^^^^^^^^^^^^^^^^^^^^
109109

110110
error: missing documentation for a static
111-
--> $DIR/missing-doc.rs:74:1
111+
--> $DIR/missing-doc.rs:75:1
112112
|
113113
LL | pub static BAR4: u32 = 0;
114114
| ^^^^^^^^^^^^^^^^^^^^^^^^^
115115

116116
error: missing documentation for a module
117-
--> $DIR/missing-doc.rs:76:1
117+
--> $DIR/missing-doc.rs:77:1
118118
|
119119
LL | / mod internal_impl {
120120
LL | | /// dox
@@ -126,31 +126,31 @@ LL | | }
126126
| |_^
127127

128128
error: missing documentation for a function
129-
--> $DIR/missing-doc.rs:79:5
129+
--> $DIR/missing-doc.rs:80:5
130130
|
131131
LL | pub fn undocumented1() {}
132132
| ^^^^^^^^^^^^^^^^^^^^^^^^^
133133

134134
error: missing documentation for a function
135-
--> $DIR/missing-doc.rs:80:5
135+
--> $DIR/missing-doc.rs:81:5
136136
|
137137
LL | pub fn undocumented2() {}
138138
| ^^^^^^^^^^^^^^^^^^^^^^^^^
139139

140140
error: missing documentation for a function
141-
--> $DIR/missing-doc.rs:81:5
141+
--> $DIR/missing-doc.rs:82:5
142142
|
143143
LL | fn undocumented3() {}
144144
| ^^^^^^^^^^^^^^^^^^^^^
145145

146146
error: missing documentation for a function
147-
--> $DIR/missing-doc.rs:86:9
147+
--> $DIR/missing-doc.rs:87:9
148148
|
149149
LL | pub fn also_undocumented1() {}
150150
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
151151

152152
error: missing documentation for a function
153-
--> $DIR/missing-doc.rs:87:9
153+
--> $DIR/missing-doc.rs:88:9
154154
|
155155
LL | fn also_undocumented2() {}
156156
| ^^^^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)