diff options
Diffstat (limited to 'src/tools/clippy/src/docs/must_use_candidate.txt')
-rw-r--r-- | src/tools/clippy/src/docs/must_use_candidate.txt | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/tools/clippy/src/docs/must_use_candidate.txt b/src/tools/clippy/src/docs/must_use_candidate.txt deleted file mode 100644 index 70890346f..000000000 --- a/src/tools/clippy/src/docs/must_use_candidate.txt +++ /dev/null @@ -1,23 +0,0 @@ -### What it does -Checks for public functions that have no -`#[must_use]` attribute, but return something not already marked -must-use, have no mutable arg and mutate no statics. - -### Why is this bad? -Not bad at all, this lint just shows places where -you could add the attribute. - -### Known problems -The lint only checks the arguments for mutable -types without looking if they are actually changed. On the other hand, -it also ignores a broad range of potentially interesting side effects, -because we cannot decide whether the programmer intends the function to -be called for the side effect or the result. Expect many false -positives. At least we don't lint if the result type is unit or already -`#[must_use]`. - -### Examples -``` -// this could be annotated with `#[must_use]`. -fn id<T>(t: T) -> T { t } -```
\ No newline at end of file |