Skip to content

Commit 3055eb9

Browse files
authored
Rollup merge of #103260 - cuviper:needs-asm-support, r=fee1-dead
Fixup a few tests needing asm support
2 parents 41a1cfd + f8e157b commit 3055eb9

File tree

12 files changed

+44
-49
lines changed

12 files changed

+44
-49
lines changed

compiler/rustc_lint/src/builtin.rs

+1
Original file line numberDiff line numberDiff line change
@@ -3176,6 +3176,7 @@ declare_lint! {
31763176
/// ### Example
31773177
///
31783178
/// ```rust,compile_fail
3179+
/// # #![feature(asm_experimental_arch)]
31793180
/// use std::arch::asm;
31803181
///
31813182
/// fn main() {

compiler/rustc_lint_defs/src/builtin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2878,7 +2878,7 @@ declare_lint! {
28782878
/// ### Example
28792879
///
28802880
/// ```rust
2881-
/// #![feature(naked_functions)]
2881+
/// #![feature(asm_experimental_arch, naked_functions)]
28822882
///
28832883
/// use std::arch::asm;
28842884
///

src/test/pretty/raw-str-nonexpr.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// needs-asm-support
12
// pp-exact
23

34
#[cfg(foo = r#"just parse this"#)]

src/test/run-make-fulldeps/intrinsic-unreachable/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
include ../tools.mk
22

3+
# needs-asm-support
34
# ignore-windows-msvc
45
#
56
# Because of Windows exception handling, the code is not necessarily any shorter.

src/test/ui/asm/unpretty-expanded.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// needs-asm-support
12
// check-pass
23
// compile-flags: -Zunpretty=expanded
34
core::arch::global_asm!("x: .byte 42");

src/test/ui/asm/unpretty-expanded.stdout

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
use ::std::prelude::rust_2015::*;
55
#[macro_use]
66
extern crate std;
7+
// needs-asm-support
78
// check-pass
89
// compile-flags: -Zunpretty=expanded
910
global_asm! ("x: .byte 42");

src/test/ui/empty_global_asm.rs

+1-14
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,8 @@
1+
// needs-asm-support
12
// run-pass
23

3-
#[allow(unused_imports)]
44
use std::arch::global_asm;
55

6-
#[cfg(target_arch = "x86")]
7-
global_asm!("");
8-
9-
#[cfg(target_arch = "x86_64")]
10-
global_asm!("");
11-
12-
#[cfg(target_arch = "arm")]
13-
global_asm!("");
14-
15-
#[cfg(target_arch = "aarch64")]
16-
global_asm!("");
17-
18-
#[cfg(target_arch = "mips")]
196
global_asm!("");
207

218
fn main() {}

src/tools/clippy/tests/ui/entry.fixed

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// needs-asm-support
12
// run-rustfix
23

34
#![allow(unused, clippy::needless_pass_by_value, clippy::collapsible_if)]

src/tools/clippy/tests/ui/entry.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// needs-asm-support
12
// run-rustfix
23

34
#![allow(unused, clippy::needless_pass_by_value, clippy::collapsible_if)]

src/tools/clippy/tests/ui/entry.stderr

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: usage of `contains_key` followed by `insert` on a `HashMap`
2-
--> $DIR/entry.rs:24:5
2+
--> $DIR/entry.rs:25:5
33
|
44
LL | / if !m.contains_key(&k) {
55
LL | | m.insert(k, v);
@@ -9,7 +9,7 @@ LL | | }
99
= note: `-D clippy::map-entry` implied by `-D warnings`
1010

1111
error: usage of `contains_key` followed by `insert` on a `HashMap`
12-
--> $DIR/entry.rs:29:5
12+
--> $DIR/entry.rs:30:5
1313
|
1414
LL | / if !m.contains_key(&k) {
1515
LL | | if true {
@@ -32,7 +32,7 @@ LL + });
3232
|
3333

3434
error: usage of `contains_key` followed by `insert` on a `HashMap`
35-
--> $DIR/entry.rs:38:5
35+
--> $DIR/entry.rs:39:5
3636
|
3737
LL | / if !m.contains_key(&k) {
3838
LL | | if true {
@@ -55,7 +55,7 @@ LL + });
5555
|
5656

5757
error: usage of `contains_key` followed by `insert` on a `HashMap`
58-
--> $DIR/entry.rs:47:5
58+
--> $DIR/entry.rs:48:5
5959
|
6060
LL | / if !m.contains_key(&k) {
6161
LL | | if true {
@@ -79,7 +79,7 @@ LL + }
7979
|
8080

8181
error: usage of `contains_key` followed by `insert` on a `HashMap`
82-
--> $DIR/entry.rs:57:5
82+
--> $DIR/entry.rs:58:5
8383
|
8484
LL | / if !m.contains_key(&k) {
8585
LL | | foo();
@@ -96,7 +96,7 @@ LL + });
9696
|
9797

9898
error: usage of `contains_key` followed by `insert` on a `HashMap`
99-
--> $DIR/entry.rs:63:5
99+
--> $DIR/entry.rs:64:5
100100
|
101101
LL | / if !m.contains_key(&k) {
102102
LL | | match 0 {
@@ -122,7 +122,7 @@ LL + });
122122
|
123123

124124
error: usage of `contains_key` followed by `insert` on a `HashMap`
125-
--> $DIR/entry.rs:75:5
125+
--> $DIR/entry.rs:76:5
126126
|
127127
LL | / if !m.contains_key(&k) {
128128
LL | | match 0 {
@@ -146,7 +146,7 @@ LL + }
146146
|
147147

148148
error: usage of `contains_key` followed by `insert` on a `HashMap`
149-
--> $DIR/entry.rs:85:5
149+
--> $DIR/entry.rs:86:5
150150
|
151151
LL | / if !m.contains_key(&k) {
152152
LL | | foo();
@@ -187,15 +187,15 @@ LL + });
187187
|
188188

189189
error: usage of `contains_key` followed by `insert` on a `HashMap`
190-
--> $DIR/entry.rs:119:5
190+
--> $DIR/entry.rs:120:5
191191
|
192192
LL | / if !m.contains_key(&m!(k)) {
193193
LL | | m.insert(m!(k), m!(v));
194194
LL | | }
195195
| |_____^ help: try this: `m.entry(m!(k)).or_insert_with(|| m!(v));`
196196

197197
error: usage of `contains_key` followed by `insert` on a `HashMap`
198-
--> $DIR/entry.rs:151:5
198+
--> $DIR/entry.rs:152:5
199199
|
200200
LL | / if !m.contains_key(&k) {
201201
LL | | let x = (String::new(), String::new());

src/tools/clippy/tests/ui/missing_doc.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// needs-asm-support
12
// aux-build: proc_macro_with_span.rs
23

34
#![warn(clippy::missing_docs_in_private_items)]

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:15:1
2+
--> $DIR/missing_doc.rs:16: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:16:1
10+
--> $DIR/missing_doc.rs:17:1
1111
|
1212
LL | pub type PubTypedef = String;
1313
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1414

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

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

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

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

3939
error: missing documentation for an enum
40-
--> $DIR/missing_doc.rs:38:1
40+
--> $DIR/missing_doc.rs:39: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:39:5
49+
--> $DIR/missing_doc.rs:40:5
5050
|
5151
LL | BazA { a: isize, b: isize },
5252
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
5353

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

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

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

7272
error: missing documentation for an enum
73-
--> $DIR/missing_doc.rs:43:1
73+
--> $DIR/missing_doc.rs:44: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:44:5
81+
--> $DIR/missing_doc.rs:45:5
8282
|
8383
LL | PubBazA { a: isize },
8484
| ^^^^^^^^^^^^^^^^^^^^
8585

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

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

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

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

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

116116
error: missing documentation for a module
117-
--> $DIR/missing_doc.rs:82:1
117+
--> $DIR/missing_doc.rs:83: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:85:5
129+
--> $DIR/missing_doc.rs:86:5
130130
|
131131
LL | pub fn undocumented1() {}
132132
| ^^^^^^^^^^^^^^^^^^^^^^^^^
133133

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

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

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

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

0 commit comments

Comments
 (0)