Skip to content

Commit 87e8ec8

Browse files
committed
power align: format test file
1 parent 42d009c commit 87e8ec8

File tree

2 files changed

+25
-26
lines changed

2 files changed

+25
-26
lines changed

tests/ui/layout/reprc-power-alignment.rs

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
#![feature(no_core)]
66
#![no_core]
77
#![no_std]
8+
#![crate_type = "lib"]
89

910
extern crate minicore;
1011
use minicore::*;
1112

1213
#[warn(uses_power_alignment)]
13-
1414
#[repr(C)]
1515
pub struct Floats {
1616
a: f64,
@@ -96,32 +96,32 @@ pub struct FloatAgg7 {
9696

9797
#[repr(C)]
9898
pub struct A {
99-
d: f64,
99+
d: f64,
100100
}
101101
#[repr(C)]
102102
pub struct B {
103-
a: A,
104-
f: f32,
105-
d: f64, //~ WARNING repr(C) does not follow the power alignment rule. This may affect platform C ABI compatibility for this type
103+
a: A,
104+
f: f32,
105+
d: f64, //~ WARNING repr(C) does not follow the power alignment rule. This may affect platform C ABI compatibility for this type
106106
}
107107
#[repr(C)]
108108
pub struct C {
109-
c: u8,
110-
b: B, //~ WARNING repr(C) does not follow the power alignment rule. This may affect platform C ABI compatibility for this type
109+
c: u8,
110+
b: B, //~ WARNING repr(C) does not follow the power alignment rule. This may affect platform C ABI compatibility for this type
111111
}
112112
#[repr(C)]
113113
pub struct D {
114-
x: f64,
114+
x: f64,
115115
}
116116
#[repr(C)]
117117
pub struct E {
118-
x: i32,
119-
d: D, //~ WARNING repr(C) does not follow the power alignment rule. This may affect platform C ABI compatibility for this type
118+
x: i32,
119+
d: D, //~ WARNING repr(C) does not follow the power alignment rule. This may affect platform C ABI compatibility for this type
120120
}
121121
#[repr(C)]
122122
pub struct F {
123-
a: u8,
124-
b: f64, //~ WARNING repr(C) does not follow the power alignment rule. This may affect platform C ABI compatibility for this type
123+
a: u8,
124+
b: f64, //~ WARNING repr(C) does not follow the power alignment rule. This may affect platform C ABI compatibility for this type
125125
}
126126
#[repr(C)]
127127
pub struct G {
@@ -173,4 +173,3 @@ pub struct M {
173173
b: K,
174174
c: L,
175175
}
176-
fn main() { }

tests/ui/layout/reprc-power-alignment.stderr

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | c: f64,
55
| ^^^^^^
66
|
77
note: the lint level is defined here
8-
--> $DIR/reprc-power-alignment.rs:12:8
8+
--> $DIR/reprc-power-alignment.rs:13:8
99
|
1010
LL | #[warn(uses_power_alignment)]
1111
| ^^^^^^^^^^^^^^^^^^^^
@@ -73,28 +73,28 @@ LL | y: Floats,
7373
| ^^^^^^^^^
7474

7575
warning: repr(C) does not follow the power alignment rule. This may affect platform C ABI compatibility for this type
76-
--> $DIR/reprc-power-alignment.rs:105:3
76+
--> $DIR/reprc-power-alignment.rs:105:5
7777
|
78-
LL | d: f64,
79-
| ^^^^^^
78+
LL | d: f64,
79+
| ^^^^^^
8080

8181
warning: repr(C) does not follow the power alignment rule. This may affect platform C ABI compatibility for this type
82-
--> $DIR/reprc-power-alignment.rs:110:3
82+
--> $DIR/reprc-power-alignment.rs:110:5
8383
|
84-
LL | b: B,
85-
| ^^^^
84+
LL | b: B,
85+
| ^^^^
8686

8787
warning: repr(C) does not follow the power alignment rule. This may affect platform C ABI compatibility for this type
88-
--> $DIR/reprc-power-alignment.rs:119:3
88+
--> $DIR/reprc-power-alignment.rs:119:5
8989
|
90-
LL | d: D,
91-
| ^^^^
90+
LL | d: D,
91+
| ^^^^
9292

9393
warning: repr(C) does not follow the power alignment rule. This may affect platform C ABI compatibility for this type
94-
--> $DIR/reprc-power-alignment.rs:124:3
94+
--> $DIR/reprc-power-alignment.rs:124:5
9595
|
96-
LL | b: f64,
97-
| ^^^^^^
96+
LL | b: f64,
97+
| ^^^^^^
9898

9999
warning: repr(C) does not follow the power alignment rule. This may affect platform C ABI compatibility for this type
100100
--> $DIR/reprc-power-alignment.rs:130:5

0 commit comments

Comments
 (0)