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,4 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/31769>
fn main() {
#[inline] struct Foo; //~ ERROR attribute cannot be used on
#[repr(C)] fn foo() {} //~ ERROR attribute should be applied to a struct, enum, or union
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
error: `#[inline]` attribute cannot be used on structs
--> $DIR/issue-31769.rs:2:5
--> $DIR/dont-allow-inline-and-repr-at-invalid-positions.rs:3:5
|
LL | #[inline] struct Foo;
| ^^^^^^^^^
|
= help: `#[inline]` can only be applied to functions

error[E0517]: attribute should be applied to a struct, enum, or union
--> $DIR/issue-31769.rs:3:12
--> $DIR/dont-allow-inline-and-repr-at-invalid-positions.rs:4:12
|
LL | #[repr(C)] fn foo() {}
| ^ ----------- not a struct, enum, or union
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/33202>
//@ run-pass
#[repr(C)]
pub enum CPOption<T> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/38763>
//@ run-pass
//@ needs-threads

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//! Regression test for <https://github.com/rust-lang/rust/issues/19001>
//@ run-pass
#![allow(dead_code)]
// check that we handle recursive arrays correctly in `type_of`
Expand Down
Loading