]> git.lizzy.rs Git - rust.git/commit
Lint for trait methods without bodies
authorRyan Cumming <etaoins@gmail.com>
Wed, 17 Jan 2018 09:41:24 +0000 (20:41 +1100)
committerRyan Cumming <etaoins@gmail.com>
Thu, 18 Jan 2018 09:01:24 +0000 (20:01 +1100)
commit5f3c340bfbc61dd676bab8b383a6ad080ef554b8
tree8b23ecd12923dfcda2a2f8e9fb307ec3f3140ddc
parent9a5f25aab3976f73f4a092295da626b30e3c7445
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
CHANGELOG.md
clippy_lints/src/inline_fn_without_body.rs [new file with mode: 0644]
clippy_lints/src/lib.rs
main [new file with mode: 0755]
tests/ui/inline_fn_without_body.rs [new file with mode: 0644]
tests/ui/inline_fn_without_body.stderr [new file with mode: 0644]