Skip to content

Commit a1fbf25

Browse files
tests: issue-14309.* => repr-rust-is-undefined.*
1 parent bcf8cf2 commit a1fbf25

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

Diff for: src/tools/tidy/src/issues.txt

-1
Original file line numberDiff line numberDiff line change
@@ -2744,7 +2744,6 @@ ui/lint/issue-111359.rs
27442744
ui/lint/issue-112489.rs
27452745
ui/lint/issue-117949.rs
27462746
ui/lint/issue-121070-let-range.rs
2747-
ui/lint/issue-14309.rs
27482747
ui/lint/issue-14837.rs
27492748
ui/lint/issue-17718-const-naming.rs
27502749
ui/lint/issue-1866.rs

Diff for: tests/ui/lint/issue-14309.rs renamed to tests/ui/lint/improper_ctypes/repr-rust-is-undefined.rs

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#![deny(improper_ctypes)]
22
#![allow(dead_code)]
33

4+
// issue https://github.com/rust-lang/rust/issues/14309
5+
// Validates we lint on repr(Rust) structs and not repr(C) structs in FFI, to implement RFC 79:
6+
// https://rust-lang.github.io/rfcs/0079-undefined-struct-layout.html
7+
48
struct A {
59
x: i32
610
}

Diff for: tests/ui/lint/issue-14309.stderr renamed to tests/ui/lint/improper_ctypes/repr-rust-is-undefined.stderr

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,74 @@
11
error: `extern` block uses type `A`, which is not FFI-safe
2-
--> $DIR/issue-14309.rs:30:15
2+
--> $DIR/repr-rust-is-undefined.rs:34:15
33
|
44
LL | fn foo(x: A);
55
| ^ not FFI-safe
66
|
77
= help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
88
= note: this struct has unspecified layout
99
note: the type is defined here
10-
--> $DIR/issue-14309.rs:4:1
10+
--> $DIR/repr-rust-is-undefined.rs:8:1
1111
|
1212
LL | struct A {
1313
| ^^^^^^^^
1414
note: the lint level is defined here
15-
--> $DIR/issue-14309.rs:1:9
15+
--> $DIR/repr-rust-is-undefined.rs:1:9
1616
|
1717
LL | #![deny(improper_ctypes)]
1818
| ^^^^^^^^^^^^^^^
1919

2020
error: `extern` block uses type `A`, which is not FFI-safe
21-
--> $DIR/issue-14309.rs:31:15
21+
--> $DIR/repr-rust-is-undefined.rs:35:15
2222
|
2323
LL | fn bar(x: B);
2424
| ^ not FFI-safe
2525
|
2626
= help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
2727
= note: this struct has unspecified layout
2828
note: the type is defined here
29-
--> $DIR/issue-14309.rs:4:1
29+
--> $DIR/repr-rust-is-undefined.rs:8:1
3030
|
3131
LL | struct A {
3232
| ^^^^^^^^
3333

3434
error: `extern` block uses type `A`, which is not FFI-safe
35-
--> $DIR/issue-14309.rs:33:15
35+
--> $DIR/repr-rust-is-undefined.rs:37:15
3636
|
3737
LL | fn qux(x: A2);
3838
| ^^ not FFI-safe
3939
|
4040
= help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
4141
= note: this struct has unspecified layout
4242
note: the type is defined here
43-
--> $DIR/issue-14309.rs:4:1
43+
--> $DIR/repr-rust-is-undefined.rs:8:1
4444
|
4545
LL | struct A {
4646
| ^^^^^^^^
4747

4848
error: `extern` block uses type `A`, which is not FFI-safe
49-
--> $DIR/issue-14309.rs:34:16
49+
--> $DIR/repr-rust-is-undefined.rs:38:16
5050
|
5151
LL | fn quux(x: B2);
5252
| ^^ not FFI-safe
5353
|
5454
= help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
5555
= note: this struct has unspecified layout
5656
note: the type is defined here
57-
--> $DIR/issue-14309.rs:4:1
57+
--> $DIR/repr-rust-is-undefined.rs:8:1
5858
|
5959
LL | struct A {
6060
| ^^^^^^^^
6161

6262
error: `extern` block uses type `A`, which is not FFI-safe
63-
--> $DIR/issue-14309.rs:36:16
63+
--> $DIR/repr-rust-is-undefined.rs:40:16
6464
|
6565
LL | fn fred(x: D);
6666
| ^ not FFI-safe
6767
|
6868
= help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
6969
= note: this struct has unspecified layout
7070
note: the type is defined here
71-
--> $DIR/issue-14309.rs:4:1
71+
--> $DIR/repr-rust-is-undefined.rs:8:1
7272
|
7373
LL | struct A {
7474
| ^^^^^^^^

0 commit comments

Comments
 (0)