Commit graph

2 commits

Author SHA1 Message Date
Ryan Cumming
7467b83377 Suggest removing inline attributes
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.
2018-01-18 20:02:42 +11:00
Ryan Cumming
5f3c340bfb Lint for trait methods without bodies
As discussed in rust-lang/rust#47475 the #[inline] attribute is
currently allowed on trait methods without bodies (i.e. without a
default implementation). This is misleading as it could be interpreted
as affecting the implementations of the trait method. Add a lint for any
use of #[inline] on a trait method without a body.

Fixes rust-lang/rust#47475
2018-01-18 20:01:24 +11:00