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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 1 addition & 14 deletions
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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 10 additions & 10 deletions
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());

0 commit comments

Comments
 (0)