Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Regression test for https://github.com/rust-lang/rust/issues/43988

#![feature(stmt_expr_attributes)]

fn main() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
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]
| ^^^^^^^^^
|
= 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)]
| ^^^^^^^^^---^^
Expand All @@ -28,15 +28,15 @@ 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)]
| ^^^^^^^^^^^^^^
|
= 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)]
| ^^^^^^^
Expand All @@ -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)]
| ^^^^^^^^^^^^^^^^^^
Expand All @@ -54,15 +54,15 @@ 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
|
= 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)]
| ^^^^^^^^^---^^
Expand All @@ -83,15 +83,15 @@ 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)]
| ^^^^^^^^^^^^^^
|
= 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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Regression test for https://github.com/rust-lang/rust/issues/24434

//@ check-pass

#![cfg_attr(true, feature(rustc_attrs))]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Regression test for https://github.com/rust-lang/rust/issues/49632

//@ run-pass
#![feature(stmt_expr_attributes)]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Regression test for https://github.com/rust-lang/rust/issues/45562

//@ run-rustfix

#![deny(unused_attributes)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Regression test for https://github.com/rust-lang/rust/issues/45562

//@ run-rustfix

#![deny(unused_attributes)]
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
| ----------^^^^^^^^^^^^^^^
Expand Down
Loading