未验证 提交 b1d03437 编写于 作者: P Philipp Krones 提交者: GitHub

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

new_ret_no_self: add sample from #3313 to Known Problems section.
......@@ -452,7 +452,8 @@
/// **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
......
......@@ -41,7 +41,7 @@
declare_clippy_lint! {
pub PTR_OFFSET_WITH_CAST,
complexity,
"uneeded pointer offset cast"
"unneeded pointer offset cast"
}
#[derive(Copy, Clone, Debug)]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册