提交 0e9769e7 编写于 作者: B bors

Auto merge of #6023 - matthiaskrgr:box, r=flip1995

link to the Box docs in related lint documentation.

changelog: link to the box docs in lint docs
......@@ -37,6 +37,7 @@
declare_clippy_lint! {
/// **What it does:** Checks for use of `Box<Vec<_>>` anywhere in the code.
/// Check the [Box documentation](https://doc.rust-lang.org/std/boxed/index.html) for more information.
///
/// **Why is this bad?** `Vec` already keeps its contents in a separate area on
/// the heap. So if you `Box` it, you just add another level of indirection
......@@ -65,6 +66,7 @@
declare_clippy_lint! {
/// **What it does:** Checks for use of `Vec<Box<T>>` where T: Sized anywhere in the code.
/// Check the [Box documentation](https://doc.rust-lang.org/std/boxed/index.html) for more information.
///
/// **Why is this bad?** `Vec` already keeps its contents in a separate area on
/// the heap. So if you `Box` its contents, you just add another level of indirection.
......@@ -167,6 +169,7 @@
declare_clippy_lint! {
/// **What it does:** Checks for use of `&Box<T>` anywhere in the code.
/// Check the [Box documentation](https://doc.rust-lang.org/std/boxed/index.html) for more information.
///
/// **Why is this bad?** Any `&Box<T>` can also be a `&T`, which is more
/// general.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册