mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-25 04:23:22 +00:00
7467b83377
This adds a `suggest_remove_item` helper that will remove an item and all trailing whitespace. This should handle both attributes on the same line as the function and on a separate line; the function takes the position of the original attribute.
27 lines
777 B
Text
27 lines
777 B
Text
error: use of `#[inline]` on trait method `default_inline` which has no body
|
|
--> $DIR/inline_fn_without_body.rs:8:5
|
|
|
|
|
8 | #[inline]
|
|
| _____-^^^^^^^^
|
|
9 | | fn default_inline();
|
|
| |____- help: remove
|
|
|
|
|
= note: `-D inline-fn-without-body` implied by `-D warnings`
|
|
|
|
error: use of `#[inline]` on trait method `always_inline` which has no body
|
|
--> $DIR/inline_fn_without_body.rs:11:5
|
|
|
|
|
11 | #[inline(always)]fn always_inline();
|
|
| ^^^^^^^^^^^^^^^^^ help: remove
|
|
|
|
error: use of `#[inline]` on trait method `never_inline` which has no body
|
|
--> $DIR/inline_fn_without_body.rs:13:5
|
|
|
|
|
13 | #[inline(never)]
|
|
| _____-^^^^^^^^^^^^^^^
|
|
14 | |
|
|
15 | | fn never_inline();
|
|
| |____- help: remove
|
|
|
|
error: aborting due to 3 previous errors
|
|
|