diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2022-03-06 14:12:30 +0000 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2022-03-06 14:12:30 +0000 |
commit | fd9d69fe14da08d6b0fef77e0eb589375f48f025 (patch) | |
tree | 1394e4efa6618c1e6c892d698814e2457903cbfb /subplotlib-derive | |
parent | 7cf68cc0b12f441637a2847bb18ba97dc2f12a42 (diff) | |
download | subplot-fd9d69fe14da08d6b0fef77e0eb589375f48f025.tar.gz |
(subplotlib-derive): Adjust attributes on steps for better diagnostics
Previously we allowed `unused` which while it also hid the dead_code
warnings, it would prevent the compiler warning us about unusued Result
objects and the like. Since we actually need test code to the be best
code, instead selectively allow dead_code, and now deny the unused
must_use values.
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'subplotlib-derive')
-rw-r--r-- | subplotlib-derive/src/lib.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/subplotlib-derive/src/lib.rs b/subplotlib-derive/src/lib.rs index ac19f73..42b5e71 100644 --- a/subplotlib-derive/src/lib.rs +++ b/subplotlib-derive/src/lib.rs @@ -412,7 +412,8 @@ fn process_step(mut input: ItemFn) -> proc_macro2::TokenStream { #structimpl #[throws(StepError)] - #[allow(unused)] // It's okay for step functions to not be used + #[allow(dead_code)] // It's okay for step functions to not be used + #[deny(unused_must_use)] #[doc(hidden)] #input |