Commit 33f1415 1 parent 19dd671 commit 33f1415 Copy full SHA for 33f1415
File tree 3 files changed +22
-3
lines changed
3 files changed +22
-3
lines changed Original file line number Diff line number Diff line change
1
+ // run-rustfix
2
+
3
+ #![warn(clippy::inline_fn_without_body)]
4
+ #![allow(clippy::inline_always)]
5
+
6
+ trait Foo {
7
+ fn default_inline();
8
+
9
+ fn always_inline();
10
+
11
+ fn never_inline();
12
+
13
+ #[inline]
14
+ fn has_body() {}
15
+ }
16
+
17
+ fn main() {}
Original file line number Diff line number Diff line change
1
+ // run-rustfix
2
+
1
3
#![ warn( clippy:: inline_fn_without_body) ]
2
4
#![ allow( clippy:: inline_always) ]
3
5
Original file line number Diff line number Diff line change 1
1
error: use of `#[inline]` on trait method `default_inline` which has no body
2
- --> $DIR/inline_fn_without_body.rs:5 :5
2
+ --> $DIR/inline_fn_without_body.rs:7 :5
3
3
|
4
4
LL | #[inline]
5
5
| _____-^^^^^^^^
@@ -9,15 +9,15 @@ LL | | fn default_inline();
9
9
= note: `-D clippy::inline-fn-without-body` implied by `-D warnings`
10
10
11
11
error: use of `#[inline]` on trait method `always_inline` which has no body
12
- --> $DIR/inline_fn_without_body.rs:8 :5
12
+ --> $DIR/inline_fn_without_body.rs:10 :5
13
13
|
14
14
LL | #[inline(always)]
15
15
| _____-^^^^^^^^^^^^^^^^
16
16
LL | | fn always_inline();
17
17
| |____- help: remove
18
18
19
19
error: use of `#[inline]` on trait method `never_inline` which has no body
20
- --> $DIR/inline_fn_without_body.rs:11 :5
20
+ --> $DIR/inline_fn_without_body.rs:13 :5
21
21
|
22
22
LL | #[inline(never)]
23
23
| _____-^^^^^^^^^^^^^^^
You can’t perform that action at this time.
0 commit comments