mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
Auto merge of #10724 - lukaslueg:largeerrdocs, r=giraffate
Clarify docs for `RESULT_LARGE_ERR` Adds a paragraph to address https://github.com/rust-lang/rust-clippy/issues/10211#issuecomment-1521548238 changelog: [`result_large_err`]: Update the document
This commit is contained in:
commit
824f2e701c
@ -252,6 +252,11 @@ declare_clippy_lint! {
|
|||||||
/// A `Result` is at least as large as the `Err`-variant. While we
|
/// A `Result` is at least as large as the `Err`-variant. While we
|
||||||
/// expect that variant to be seldomly used, the compiler needs to reserve
|
/// expect that variant to be seldomly used, the compiler needs to reserve
|
||||||
/// and move that much memory every single time.
|
/// and move that much memory every single time.
|
||||||
|
/// Furthermore, errors are often simply passed up the call-stack, making
|
||||||
|
/// use of the `?`-operator and its type-conversion mechanics. If the
|
||||||
|
/// `Err`-variant further up the call-stack stores the `Err`-variant in
|
||||||
|
/// question (as library code often does), it itself needs to be at least
|
||||||
|
/// as large, propagating the problem.
|
||||||
///
|
///
|
||||||
/// ### Known problems
|
/// ### Known problems
|
||||||
/// The size determined by Clippy is platform-dependent.
|
/// The size determined by Clippy is platform-dependent.
|
||||||
|
Loading…
Reference in New Issue
Block a user