Skip to content

Commit 7424b89

Browse files
committed
Adjust tests/ui/attr-usage-inline.rs
- Move `tests/ui/attr-usage-inline.rs` to `tests/ui/attributes/inline/`. - Briefly document test intent. - Drop unnecessary `#[allow(dead_code)]` as this is allowed-by-default for ui test suite.
1 parent 88f8bf7 commit 7424b89

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Diff for: tests/ui/attr-usage-inline.rs renamed to tests/ui/attributes/inline/attr-usage-inline.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#![allow(dead_code)]
1+
//! Check that `#[inline]` attribute can only be applied to fn-like targets (e.g. function or
2+
//! closure), and when misapplied to other targets an error is emitted.
23
34
#[inline]
45
fn f() {}

Diff for: tests/ui/attr-usage-inline.stderr renamed to tests/ui/attributes/inline/attr-usage-inline.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error[E0518]: attribute should be applied to function or closure
2-
--> $DIR/attr-usage-inline.rs:6:1
2+
--> $DIR/attr-usage-inline.rs:7:1
33
|
44
LL | #[inline]
55
| ^^^^^^^^^
66
LL | struct S;
77
| --------- not a function or closure
88

99
error[E0518]: attribute should be applied to function or closure
10-
--> $DIR/attr-usage-inline.rs:20:1
10+
--> $DIR/attr-usage-inline.rs:21:1
1111
|
1212
LL | #[inline]
1313
| ^^^^^^^^^ not a function or closure

0 commit comments

Comments
 (0)