File tree Expand file tree Collapse file tree 3 files changed +22
-3
lines changed Expand file tree Collapse file tree 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+
13#![ warn( clippy:: inline_fn_without_body) ]
24#![ allow( clippy:: inline_always) ]
35
Original file line number Diff line number Diff line change 11error: 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
33 |
44LL | #[inline]
55 | _____-^^^^^^^^
@@ -9,15 +9,15 @@ LL | | fn default_inline();
99 = note: `-D clippy::inline-fn-without-body` implied by `-D warnings`
1010
1111error: 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
1313 |
1414LL | #[inline(always)]
1515 | _____-^^^^^^^^^^^^^^^^
1616LL | | fn always_inline();
1717 | |____- help: remove
1818
1919error: 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
2121 |
2222LL | #[inline(never)]
2323 | _____-^^^^^^^^^^^^^^^
You can’t perform that action at this time.
0 commit comments