From 40904ddd753acb12a5343a5e398317f2a2276aae Mon Sep 17 00:00:00 2001 From: danieljofficial Date: Sat, 2 May 2026 12:02:25 +0100 Subject: [PATCH] add issue links and bless attribute tests --- .../attribute-on-wrong-item-inline-repr.rs | 2 ++ .../attribute-on-wrong-item-inline-repr.stderr | 18 +++++++++--------- .../cfg-attr-feature-gate-and-rustc-dummy.rs | 2 ++ .../attributes/inline-attribute-on-closure.rs | 2 ++ .../attributes/no-mangle-on-const-error.fixed | 2 ++ .../ui/attributes/no-mangle-on-const-error.rs | 2 ++ .../attributes/no-mangle-on-const-error.stderr | 2 +- 7 files changed, 20 insertions(+), 10 deletions(-) diff --git a/tests/ui/attributes/attribute-on-wrong-item-inline-repr.rs b/tests/ui/attributes/attribute-on-wrong-item-inline-repr.rs index bd23e0e2457d..c29edbe14f24 100644 --- a/tests/ui/attributes/attribute-on-wrong-item-inline-repr.rs +++ b/tests/ui/attributes/attribute-on-wrong-item-inline-repr.rs @@ -1,3 +1,5 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/43988 + #![feature(stmt_expr_attributes)] fn main() { diff --git a/tests/ui/attributes/attribute-on-wrong-item-inline-repr.stderr b/tests/ui/attributes/attribute-on-wrong-item-inline-repr.stderr index d393255e0ee1..49f67bf6ad04 100644 --- a/tests/ui/attributes/attribute-on-wrong-item-inline-repr.stderr +++ b/tests/ui/attributes/attribute-on-wrong-item-inline-repr.stderr @@ -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 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 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 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 diff --git a/tests/ui/attributes/cfg-attr-feature-gate-and-rustc-dummy.rs b/tests/ui/attributes/cfg-attr-feature-gate-and-rustc-dummy.rs index 429bcf4a8d87..c7f56494f8ee 100644 --- a/tests/ui/attributes/cfg-attr-feature-gate-and-rustc-dummy.rs +++ b/tests/ui/attributes/cfg-attr-feature-gate-and-rustc-dummy.rs @@ -1,3 +1,5 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/24434 + //@ check-pass #![cfg_attr(true, feature(rustc_attrs))] diff --git a/tests/ui/attributes/inline-attribute-on-closure.rs b/tests/ui/attributes/inline-attribute-on-closure.rs index f17891c45013..981d58e11e46 100644 --- a/tests/ui/attributes/inline-attribute-on-closure.rs +++ b/tests/ui/attributes/inline-attribute-on-closure.rs @@ -1,3 +1,5 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/49632 + //@ run-pass #![feature(stmt_expr_attributes)] diff --git a/tests/ui/attributes/no-mangle-on-const-error.fixed b/tests/ui/attributes/no-mangle-on-const-error.fixed index 529b5bd744e0..0612385521dd 100644 --- a/tests/ui/attributes/no-mangle-on-const-error.fixed +++ b/tests/ui/attributes/no-mangle-on-const-error.fixed @@ -1,3 +1,5 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/45562 + //@ run-rustfix #![deny(unused_attributes)] diff --git a/tests/ui/attributes/no-mangle-on-const-error.rs b/tests/ui/attributes/no-mangle-on-const-error.rs index 7c30a967c784..0366ce2e4b23 100644 --- a/tests/ui/attributes/no-mangle-on-const-error.rs +++ b/tests/ui/attributes/no-mangle-on-const-error.rs @@ -1,3 +1,5 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/45562 + //@ run-rustfix #![deny(unused_attributes)] diff --git a/tests/ui/attributes/no-mangle-on-const-error.stderr b/tests/ui/attributes/no-mangle-on-const-error.stderr index 3372986af937..af46ea8a5b9e 100644 --- a/tests/ui/attributes/no-mangle-on-const-error.stderr +++ b/tests/ui/attributes/no-mangle-on-const-error.stderr @@ -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; | ----------^^^^^^^^^^^^^^^