Skip to content

result_large_err difficult to suppress selectively #15404

@ijackson

Description

@ijackson

Description

In my program, I have a StartupError type, which is quite large. This isn't a problem because this is only returned from functions called at startup.

I would like to suppress the result_large_err lint for Result<_, StartupError> but that doesn't seem to be possible. Instead, I have to suppress it globally, since doing so per-function is very obtrusive.

Reproducer

git clone https://salsa.debian.org/dgit-team/tag2upload-service-manager
cd tag2upload-service-manager
git checkout 08e21c1f6d97a8001759aff6d57e89b247e5b497
cargo +stable clippy

Version

(bookworm)rustcargo@zealot:/volatile/rustcargo/Rustup/Tag2upload/tag2upload-service-manager$ rustc +stable -vV
rustc 1.88.0 (6b00bc388 2025-06-23)
binary: rustc
commit-hash: 6b00bc3880198600130e1cf62b8f8a93494488cc
commit-date: 2025-06-23
host: x86_64-unknown-linux-gnu
release: 1.88.0
LLVM version: 20.1.5
(bookworm)rustcargo@zealot:/volatile/rustcargo/Rustup/Tag2upload/tag2upload-service-manager$

Additional Labels

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions