about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeón Orell Valerian Liehr <me@fmease.dev>2024-09-14 18:12:13 +0200
committerGitHub <noreply@github.com>2024-09-14 18:12:13 +0200
commitd1701a53340a6dc65a777d0564163522f84bdcbe (patch)
tree50bfcf2d2bfd9d47bd0b4bc59fefb2fcd9cb0863
parent03e8b6bbfa1c098eb125ee192a012bcab4083c9b (diff)
parent14285e9804c2500d674d215a8abfaef9b0d3672d (diff)
downloadrust-d1701a53340a6dc65a777d0564163522f84bdcbe.tar.gz
rust-d1701a53340a6dc65a777d0564163522f84bdcbe.zip
Rollup merge of #130343 - Fayti1703:patch-correct-async-block-lint-doc, r=compiler-errors
docs: Enable required feature for 'closure_returning_async_block' lint

Failing to do this results in the lint example output complaining about the lint not existing instead of the thing the lint is supposed to be complaining about.

See <https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html#closure-returning-async-block>:
![image](https://github.com/user-attachments/assets/78bae16f-3fb6-4d6d-b8aa-768b477cd187)
-rw-r--r--compiler/rustc_lint/src/async_closures.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_lint/src/async_closures.rs b/compiler/rustc_lint/src/async_closures.rs
index 33cc5738262..2a821b71103 100644
--- a/compiler/rustc_lint/src/async_closures.rs
+++ b/compiler/rustc_lint/src/async_closures.rs
@@ -12,6 +12,7 @@ declare_lint! {
     /// ### Example
     ///
     /// ```rust
+    /// #![feature(async_closure)]
     /// #![warn(closure_returning_async_block)]
     /// let c = |x: &str| async {};
     /// ```