Skip to content

Commit dd3cb25

Browse files
Rollup merge of #156083 - danieljofficial:move-tests-attributes, r=JonathanBrouwer
Move tests attributes I moved some attribute tests out of the issues folder into the attribute folder, please find time to review
2 parents 1f97ab1 + 40904dd commit dd3cb25

7 files changed

Lines changed: 20 additions & 10 deletions

tests/ui/issues/issue-43988.rs renamed to tests/ui/attributes/attribute-on-wrong-item-inline-repr.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Regression test for https://github.com/rust-lang/rust/issues/43988
2+
13
#![feature(stmt_expr_attributes)]
24

35
fn main() {

tests/ui/issues/issue-43988.stderr renamed to tests/ui/attributes/attribute-on-wrong-item-inline-repr.stderr

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error: `#[inline]` attribute cannot be used on statements
2-
--> $DIR/issue-43988.rs:5:5
2+
--> $DIR/attribute-on-wrong-item-inline-repr.rs:7:5
33
|
44
LL | #[inline]
55
| ^^^^^^^^^
66
|
77
= help: `#[inline]` can only be applied to functions
88

99
error[E0539]: malformed `inline` attribute input
10-
--> $DIR/issue-43988.rs:10:5
10+
--> $DIR/attribute-on-wrong-item-inline-repr.rs:12:5
1111
|
1212
LL | #[inline(XYZ)]
1313
| ^^^^^^^^^---^^
@@ -28,15 +28,15 @@ LL + #[inline]
2828
|
2929

3030
error: `#[inline]` attribute cannot be used on statements
31-
--> $DIR/issue-43988.rs:10:5
31+
--> $DIR/attribute-on-wrong-item-inline-repr.rs:12:5
3232
|
3333
LL | #[inline(XYZ)]
3434
| ^^^^^^^^^^^^^^
3535
|
3636
= help: `#[inline]` can only be applied to functions
3737

3838
error[E0552]: unrecognized representation hint
39-
--> $DIR/issue-43988.rs:15:12
39+
--> $DIR/attribute-on-wrong-item-inline-repr.rs:17:12
4040
|
4141
LL | #[repr(nothing)]
4242
| ^^^^^^^
@@ -45,7 +45,7 @@ LL | #[repr(nothing)]
4545
= note: for more information, visit <https://doc.rust-lang.org/reference/type-layout.html?highlight=repr#representations>
4646

4747
error[E0552]: unrecognized representation hint
48-
--> $DIR/issue-43988.rs:19:12
48+
--> $DIR/attribute-on-wrong-item-inline-repr.rs:21:12
4949
|
5050
LL | #[repr(something_not_real)]
5151
| ^^^^^^^^^^^^^^^^^^
@@ -54,15 +54,15 @@ LL | #[repr(something_not_real)]
5454
= note: for more information, visit <https://doc.rust-lang.org/reference/type-layout.html?highlight=repr#representations>
5555

5656
error[E0539]: malformed `repr` attribute input
57-
--> $DIR/issue-43988.rs:25:5
57+
--> $DIR/attribute-on-wrong-item-inline-repr.rs:27:5
5858
|
5959
LL | #[repr]
6060
| ^^^^^^^ expected this to be a list
6161
|
6262
= note: for more information, visit <https://doc.rust-lang.org/reference/type-layout.html#representations>
6363

6464
error[E0539]: malformed `inline` attribute input
65-
--> $DIR/issue-43988.rs:31:5
65+
--> $DIR/attribute-on-wrong-item-inline-repr.rs:33:5
6666
|
6767
LL | #[inline(ABC)]
6868
| ^^^^^^^^^---^^
@@ -83,15 +83,15 @@ LL + #[inline]
8383
|
8484

8585
error: `#[inline]` attribute cannot be used on expressions
86-
--> $DIR/issue-43988.rs:31:5
86+
--> $DIR/attribute-on-wrong-item-inline-repr.rs:33:5
8787
|
8888
LL | #[inline(ABC)]
8989
| ^^^^^^^^^^^^^^
9090
|
9191
= help: `#[inline]` can only be applied to functions
9292

9393
error[E0539]: malformed `repr` attribute input
94-
--> $DIR/issue-43988.rs:36:14
94+
--> $DIR/attribute-on-wrong-item-inline-repr.rs:38:14
9595
|
9696
LL | let _z = #[repr] 1;
9797
| ^^^^^^^ expected this to be a list

tests/ui/issues/issue-24434.rs renamed to tests/ui/attributes/cfg-attr-feature-gate-and-rustc-dummy.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Regression test for https://github.com/rust-lang/rust/issues/24434
2+
13
//@ check-pass
24

35
#![cfg_attr(true, feature(rustc_attrs))]

tests/ui/issues/issue-49632.rs renamed to tests/ui/attributes/inline-attribute-on-closure.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Regression test for https://github.com/rust-lang/rust/issues/49632
2+
13
//@ run-pass
24
#![feature(stmt_expr_attributes)]
35

tests/ui/issues/issue-45562.fixed renamed to tests/ui/attributes/no-mangle-on-const-error.fixed

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Regression test for https://github.com/rust-lang/rust/issues/45562
2+
13
//@ run-rustfix
24

35
#![deny(unused_attributes)]

tests/ui/issues/issue-45562.rs renamed to tests/ui/attributes/no-mangle-on-const-error.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! Regression test for https://github.com/rust-lang/rust/issues/45562
2+
13
//@ run-rustfix
24

35
#![deny(unused_attributes)]

tests/ui/issues/issue-45562.stderr renamed to tests/ui/attributes/no-mangle-on-const-error.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: const items should never be `#[no_mangle]`
2-
--> $DIR/issue-45562.rs:5:14
2+
--> $DIR/no-mangle-on-const-error.rs:7:14
33
|
44
LL | #[no_mangle] pub const RAH: usize = 5;
55
| ----------^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)