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
This commit is contained in:
commit
9b0043095a
10 changed files with 242 additions and 20 deletions
|
@ -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]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue