Skip to content

Commit 1bdb9a5

Browse files
authored
Rollup merge of rust-lang#49665 - draganmladjenovic:mips_tests, r=nikomatsakis
Small nits to make couple of tests pass on mips targets.
2 parents 63c4d50 + 0a94344 commit 1bdb9a5

5 files changed

+18
-8
lines changed

src/test/codegen/link_section.rs

+6
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,14 @@
1515
// CHECK: @VAR1 = constant <{ [4 x i8] }> <{ [4 x i8] c"\01\00\00\00" }>, section ".test_one"
1616
#[no_mangle]
1717
#[link_section = ".test_one"]
18+
#[cfg(target_endian = "little")]
1819
pub static VAR1: u32 = 1;
1920

21+
#[no_mangle]
22+
#[link_section = ".test_one"]
23+
#[cfg(target_endian = "big")]
24+
pub static VAR1: u32 = 0x01000000;
25+
2026
pub enum E {
2127
A(u32),
2228
B(f32)

src/test/ui/asm-out-assign-imm.rs

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// ignore-emscripten
1313
// ignore-powerpc
1414
// ignore-sparc
15+
// ignore-mips
1516

1617
#![feature(asm)]
1718

src/test/ui/asm-out-assign-imm.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0384]: cannot assign twice to immutable variable `x`
2-
--> $DIR/asm-out-assign-imm.rs:29:9
2+
--> $DIR/asm-out-assign-imm.rs:30:9
33
|
44
LL | x = 1;
55
| ----- first assignment to `x`

src/test/ui/target-feature-wrong.rs

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
// ignore-aarch64
1313
// ignore-wasm
1414
// ignore-emscripten
15+
// ignore-mips
16+
// ignore-powerpc
17+
// ignore-s390x
1518

1619
#![feature(target_feature)]
1720

src/test/ui/target-feature-wrong.stderr

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
warning: #[target_feature = ".."] is deprecated and will eventually be removed, use #[target_feature(enable = "..")] instead
2-
--> $DIR/target-feature-wrong.rs:18:1
2+
--> $DIR/target-feature-wrong.rs:21:1
33
|
44
LL | #[target_feature = "+sse2"]
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
66

77
error: the feature named `foo` is not valid for this target
8-
--> $DIR/target-feature-wrong.rs:20:18
8+
--> $DIR/target-feature-wrong.rs:23:18
99
|
1010
LL | #[target_feature(enable = "foo")]
1111
| ^^^^^^^^^^^^^^
1212

1313
error: #[target_feature(..)] only accepts sub-keys of `enable` currently
14-
--> $DIR/target-feature-wrong.rs:22:18
14+
--> $DIR/target-feature-wrong.rs:25:18
1515
|
1616
LL | #[target_feature(bar)]
1717
| ^^^
1818

1919
error: #[target_feature(..)] only accepts sub-keys of `enable` currently
20-
--> $DIR/target-feature-wrong.rs:24:18
20+
--> $DIR/target-feature-wrong.rs:27:18
2121
|
2222
LL | #[target_feature(disable = "baz")]
2323
| ^^^^^^^^^^^^^^^
2424

2525
error: #[target_feature(..)] can only be applied to `unsafe` function
26-
--> $DIR/target-feature-wrong.rs:28:1
26+
--> $DIR/target-feature-wrong.rs:31:1
2727
|
2828
LL | #[target_feature(enable = "sse2")]
2929
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3030

3131
error: attribute should be applied to a function
32-
--> $DIR/target-feature-wrong.rs:32:1
32+
--> $DIR/target-feature-wrong.rs:35:1
3333
|
3434
LL | #[target_feature(enable = "sse2")]
3535
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -38,7 +38,7 @@ LL | mod another {}
3838
| -------------- not a function
3939

4040
error: cannot use #[inline(always)] with #[target_feature]
41-
--> $DIR/target-feature-wrong.rs:36:1
41+
--> $DIR/target-feature-wrong.rs:39:1
4242
|
4343
LL | #[inline(always)]
4444
| ^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)