diff options
| author | bors <bors@rust-lang.org> | 2023-05-02 00:41:36 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-05-02 00:41:36 +0000 |
| commit | 824f2e701c2c03b355ced3beae9898c45ce80db3 (patch) | |
| tree | 150009a5ebcc394f50c7c0f39f862e2ea87e1078 | |
| parent | 7bc3da975a27fe6fe981559171f1cd7a778adb86 (diff) | |
| parent | 2ed254e29f237c90bafdc1c064f98c61cf42f685 (diff) | |
| download | rust-824f2e701c2c03b355ced3beae9898c45ce80db3.tar.gz rust-824f2e701c2c03b355ced3beae9898c45ce80db3.zip | |
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
| -rw-r--r-- | clippy_lints/src/functions/mod.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clippy_lints/src/functions/mod.rs b/clippy_lints/src/functions/mod.rs index 1528a7be09c..ee10334c67f 100644 --- a/clippy_lints/src/functions/mod.rs +++ b/clippy_lints/src/functions/mod.rs @@ -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. |
