add issue links and bless attribute tests

This commit is contained in:
danieljofficial
2026-05-02 12:02:25 +01:00
parent 200d4e3b8a
commit 40904ddd75
7 changed files with 20 additions and 10 deletions
@@ -1,3 +1,5 @@
//! Regression test for https://github.com/rust-lang/rust/issues/43988
#![feature(stmt_expr_attributes)]
fn main() {
@@ -1,5 +1,5 @@
error: `#[inline]` attribute cannot be used on statements
--> $DIR/issue-43988.rs:5:5
--> $DIR/attribute-on-wrong-item-inline-repr.rs:7:5
|
LL | #[inline]
| ^^^^^^^^^
@@ -7,7 +7,7 @@ LL | #[inline]
= help: `#[inline]` can only be applied to functions
error[E0539]: malformed `inline` attribute input
--> $DIR/issue-43988.rs:10:5
--> $DIR/attribute-on-wrong-item-inline-repr.rs:12:5
|
LL | #[inline(XYZ)]
| ^^^^^^^^^---^^
@@ -28,7 +28,7 @@ LL + #[inline]
|
error: `#[inline]` attribute cannot be used on statements
--> $DIR/issue-43988.rs:10:5
--> $DIR/attribute-on-wrong-item-inline-repr.rs:12:5
|
LL | #[inline(XYZ)]
| ^^^^^^^^^^^^^^
@@ -36,7 +36,7 @@ LL | #[inline(XYZ)]
= help: `#[inline]` can only be applied to functions
error[E0552]: unrecognized representation hint
--> $DIR/issue-43988.rs:15:12
--> $DIR/attribute-on-wrong-item-inline-repr.rs:17:12
|
LL | #[repr(nothing)]
| ^^^^^^^
@@ -45,7 +45,7 @@ LL | #[repr(nothing)]
= note: for more information, visit <https://doc.rust-lang.org/reference/type-layout.html?highlight=repr#representations>
error[E0552]: unrecognized representation hint
--> $DIR/issue-43988.rs:19:12
--> $DIR/attribute-on-wrong-item-inline-repr.rs:21:12
|
LL | #[repr(something_not_real)]
| ^^^^^^^^^^^^^^^^^^
@@ -54,7 +54,7 @@ LL | #[repr(something_not_real)]
= note: for more information, visit <https://doc.rust-lang.org/reference/type-layout.html?highlight=repr#representations>
error[E0539]: malformed `repr` attribute input
--> $DIR/issue-43988.rs:25:5
--> $DIR/attribute-on-wrong-item-inline-repr.rs:27:5
|
LL | #[repr]
| ^^^^^^^ expected this to be a list
@@ -62,7 +62,7 @@ LL | #[repr]
= note: for more information, visit <https://doc.rust-lang.org/reference/type-layout.html#representations>
error[E0539]: malformed `inline` attribute input
--> $DIR/issue-43988.rs:31:5
--> $DIR/attribute-on-wrong-item-inline-repr.rs:33:5
|
LL | #[inline(ABC)]
| ^^^^^^^^^---^^
@@ -83,7 +83,7 @@ LL + #[inline]
|
error: `#[inline]` attribute cannot be used on expressions
--> $DIR/issue-43988.rs:31:5
--> $DIR/attribute-on-wrong-item-inline-repr.rs:33:5
|
LL | #[inline(ABC)]
| ^^^^^^^^^^^^^^
@@ -91,7 +91,7 @@ LL | #[inline(ABC)]
= help: `#[inline]` can only be applied to functions
error[E0539]: malformed `repr` attribute input
--> $DIR/issue-43988.rs:36:14
--> $DIR/attribute-on-wrong-item-inline-repr.rs:38:14
|
LL | let _z = #[repr] 1;
| ^^^^^^^ expected this to be a list
@@ -1,3 +1,5 @@
//! Regression test for https://github.com/rust-lang/rust/issues/24434
//@ check-pass
#![cfg_attr(true, feature(rustc_attrs))]
@@ -1,3 +1,5 @@
//! Regression test for https://github.com/rust-lang/rust/issues/49632
//@ run-pass
#![feature(stmt_expr_attributes)]
@@ -1,3 +1,5 @@
//! Regression test for https://github.com/rust-lang/rust/issues/45562
//@ run-rustfix
#![deny(unused_attributes)]
@@ -1,3 +1,5 @@
//! Regression test for https://github.com/rust-lang/rust/issues/45562
//@ run-rustfix
#![deny(unused_attributes)]
@@ -1,5 +1,5 @@
error: const items should never be `#[no_mangle]`
--> $DIR/issue-45562.rs:5:14
--> $DIR/no-mangle-on-const-error.rs:7:14
|
LL | #[no_mangle] pub const RAH: usize = 5;
| ----------^^^^^^^^^^^^^^^