Skip to content

Commit 98cc5dc

Browse files
committed
test: added testcase ui/attributes/inline/rustc-force-inline-conflict-with-inline
1 parent 5c2400b commit 98cc5dc

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#![feature(rustc_attrs)]
2+
3+
#[inline] //~ NOTE: the inline attribute is specified here
4+
#[rustc_force_inline] //~ ERROR: cannot be used together
5+
fn foo() {}
6+
7+
#[rustc_force_inline] //~ ERROR: cannot be used together
8+
#[inline] //~ NOTE: the inline attribute is specified here
9+
fn bar() {}
10+
11+
fn main() {}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
error: `#[rustc_force_inline]` and `#[inline]` cannot be used together
2+
--> $DIR/rustc-force-inline-conflict-with-inline.rs:4:1
3+
|
4+
LL | #[inline]
5+
| --------- the inline attribute is specified here
6+
LL | #[rustc_force_inline]
7+
| ^^^^^^^^^^^^^^^^^^^^^
8+
9+
error: `#[rustc_force_inline]` and `#[inline]` cannot be used together
10+
--> $DIR/rustc-force-inline-conflict-with-inline.rs:7:1
11+
|
12+
LL | #[rustc_force_inline]
13+
| ^^^^^^^^^^^^^^^^^^^^^
14+
LL | #[inline]
15+
| --------- the inline attribute is specified here
16+
17+
error: aborting due to 2 previous errors
18+

0 commit comments

Comments
 (0)