diff options
Diffstat (limited to 'src/tools/clippy/src/docs/double_must_use.txt')
-rw-r--r-- | src/tools/clippy/src/docs/double_must_use.txt | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/tools/clippy/src/docs/double_must_use.txt b/src/tools/clippy/src/docs/double_must_use.txt new file mode 100644 index 000000000..0017d10d4 --- /dev/null +++ b/src/tools/clippy/src/docs/double_must_use.txt @@ -0,0 +1,17 @@ +### What it does +Checks for a `#[must_use]` attribute without +further information on functions and methods that return a type already +marked as `#[must_use]`. + +### Why is this bad? +The attribute isn't needed. Not using the result +will already be reported. Alternatively, one can add some text to the +attribute to improve the lint message. + +### Examples +``` +#[must_use] +fn double_must_use() -> Result<(), ()> { + unimplemented!(); +} +```
\ No newline at end of file |