]> git.lizzy.rs Git - rust.git/blob - src/docs/inline_fn_without_body.txt
Auto merge of #9421 - xphoniex:fix-#9420, r=giraffate
[rust.git] / src / docs / inline_fn_without_body.txt
1 ### What it does
2 Checks for `#[inline]` on trait methods without bodies
3
4 ### Why is this bad?
5 Only implementations of trait methods may be inlined.
6 The inline attribute is ignored for trait methods without bodies.
7
8 ### Example
9 ```
10 trait Animal {
11     #[inline]
12     fn name(&self) -> &'static str;
13 }
14 ```