diff --git a/crates/ruff_linter/src/rules/flake8_comprehensions/rules/unnecessary_comprehension_in_call.rs b/crates/ruff_linter/src/rules/flake8_comprehensions/rules/unnecessary_comprehension_in_call.rs index 9cde32f2ab..0ce5f88f1a 100644 --- a/crates/ruff_linter/src/rules/flake8_comprehensions/rules/unnecessary_comprehension_in_call.rs +++ b/crates/ruff_linter/src/rules/flake8_comprehensions/rules/unnecessary_comprehension_in_call.rs @@ -14,9 +14,9 @@ use crate::rules::flake8_comprehensions::fixes; /// Checks for unnecessary list comprehensions passed to builtin functions that take an iterable. /// /// ## Why is this bad? -/// Many builtin functions (this rule currently covers `any`, `all`, `min`, `max`, and `sum`) take -/// any iterable, including a generator. Constructing a temporary list via list comprehension is -/// unnecessary and wastes memory for large iterables. +/// Many builtin functions (this rule currently covers `any` and `all` in stable, along with `min`, +/// `max`, and `sum` in [preview]) accept any iterable, including a generator. Constructing a +/// temporary list via list comprehension is unnecessary and wastes memory for large iterables. /// /// `any` and `all` can also short-circuit iteration, saving a lot of time. The unnecessary /// comprehension forces a full iteration of the input iterable, giving up the benefits of @@ -63,6 +63,7 @@ use crate::rules::flake8_comprehensions::fixes; /// has side effects (due to laziness and short-circuiting). The fix may also drop comments when /// rewriting some comprehensions. /// +/// [preview]: https://docs.astral.sh/ruff/preview/ #[violation] pub struct UnnecessaryComprehensionInCall;