diff options
Diffstat (limited to '')
-rw-r--r-- | src/tools/clippy/tests/ui/result_large_err.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/result_large_err.rs b/src/tools/clippy/tests/ui/result_large_err.rs index f7df3b856..1c12cebfd 100644 --- a/src/tools/clippy/tests/ui/result_large_err.rs +++ b/src/tools/clippy/tests/ui/result_large_err.rs @@ -50,6 +50,18 @@ impl LargeErrorVariants<()> { } } +enum MultipleLargeVariants { + _Biggest([u8; 1024]), + _AlsoBig([u8; 512]), + _Ok(usize), +} + +impl MultipleLargeVariants { + fn large_enum_error() -> Result<(), Self> { + Ok(()) + } +} + trait TraitForcesLargeError { fn large_error() -> Result<(), [u8; 512]> { Ok(()) @@ -96,4 +108,10 @@ pub fn array_error<T, U>() -> Result<(), ArrayError<(i32, T), U>> { Ok(()) } +// Issue #10005 +enum Empty {} +fn _empty_error() -> Result<(), Empty> { + Ok(()) +} + fn main() {} |