Merge pull request #3334 from matthiaskrgr/new-ret-no-self__doc

new_ret_no_self: add sample from #3313 to Known Problems section.
This commit is contained in:
Philipp Krones 2018-10-19 01:32:57 +02:00 committed by GitHub
commit b1d0343749
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -452,7 +452,8 @@ declare_clippy_lint! {
/// **Why is this bad?** As a convention, `new` methods are used to make a new
/// instance of a type.
///
/// **Known problems:** None.
/// **Known problems:** The lint fires when the return type is wrapping `Self`.
/// Example: `fn new() -> Result<Self, E> {}`
///
/// **Example:**
/// ```rust

View File

@ -41,7 +41,7 @@ use std::fmt;
declare_clippy_lint! {
pub PTR_OFFSET_WITH_CAST,
complexity,
"uneeded pointer offset cast"
"unneeded pointer offset cast"
}
#[derive(Copy, Clone, Debug)]