Skip to content

Commit

Permalink
Clarify docs for RESULT_LARGE_ERR
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaslueg committed Apr 29, 2023
1 parent 3594d55 commit 2ed254e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions clippy_lints/src/functions/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,11 @@ declare_clippy_lint! {
/// 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
/// 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
/// The size determined by Clippy is platform-dependent.
Expand Down

0 comments on commit 2ed254e

Please sign in to comment.