about summary refs log tree commit diff
path: root/compiler/rustc_lint/src/multiple_supertrait_upcastable.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-07-11 06:59:10 +0000
committerbors <bors@rust-lang.org>2024-07-11 06:59:10 +0000
commit9b0043095a2ddceb2ddad7704c084293d0c8cd09 (patch)
tree69a878f28a8f4e97956bf016373941d78c4d0e0f /compiler/rustc_lint/src/multiple_supertrait_upcastable.rs
parent8c39ac9eccdfaeff11bd3b6107817a81fe0a3a43 (diff)
parentacc13e29d1f42805ea0701c05f59beb646978c1d (diff)
downloadrust-9b0043095a2ddceb2ddad7704c084293d0c8cd09.tar.gz
rust-9b0043095a2ddceb2ddad7704c084293d0c8cd09.zip
Auto merge of #127097 - compiler-errors:async-closure-lint, r=oli-obk
Implement simple, unstable lint to suggest turning closure-of-async-block into async-closure

We want to eventually suggest people to turn `|| async {}` to `async || {}`. This begins doing that. It's a pretty rudimentary lint, but I wanted to get something down so I wouldn't lose the code.

Tracking:
* #62290
Diffstat (limited to 'compiler/rustc_lint/src/multiple_supertrait_upcastable.rs')
-rw-r--r--compiler/rustc_lint/src/multiple_supertrait_upcastable.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_lint/src/multiple_supertrait_upcastable.rs b/compiler/rustc_lint/src/multiple_supertrait_upcastable.rs
index 445dcd41e5d..93dd5e764c6 100644
--- a/compiler/rustc_lint/src/multiple_supertrait_upcastable.rs
+++ b/compiler/rustc_lint/src/multiple_supertrait_upcastable.rs
@@ -2,7 +2,6 @@ use crate::{LateContext, LateLintPass, LintContext};
 
 use rustc_hir as hir;
 use rustc_session::{declare_lint, declare_lint_pass};
-use rustc_span::sym;
 
 declare_lint! {
     /// The `multiple_supertrait_upcastable` lint detects when an object-safe trait has multiple
@@ -30,7 +29,7 @@ declare_lint! {
     pub MULTIPLE_SUPERTRAIT_UPCASTABLE,
     Allow,
     "detect when an object-safe trait has multiple supertraits",
-    @feature_gate = sym::multiple_supertrait_upcastable;
+    @feature_gate = multiple_supertrait_upcastable;
 }
 
 declare_lint_pass!(MultipleSupertraitUpcastable => [MULTIPLE_SUPERTRAIT_UPCASTABLE]);