diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-10-19 21:46:28 +0000 | 
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2023-10-20 21:14:01 +0000 | 
| commit | e96ce20b34789d29e925425da6cf138927b80a79 (patch) | |
| tree | 4032e01ddd5137d1ee98b69277953f2962bbf14b /compiler/rustc_lint/src | |
| parent | 60956837cfbf22bd8edd80f57a856e141f7deb8c (diff) | |
| download | rust-e96ce20b34789d29e925425da6cf138927b80a79.tar.gz rust-e96ce20b34789d29e925425da6cf138927b80a79.zip | |
s/generator/coroutine/
Diffstat (limited to 'compiler/rustc_lint/src')
| -rw-r--r-- | compiler/rustc_lint/src/lints.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_lint/src/unused.rs | 4 | 
2 files changed, 3 insertions, 3 deletions
| diff --git a/compiler/rustc_lint/src/lints.rs b/compiler/rustc_lint/src/lints.rs index ce52e95e0f1..756899e50a8 100644 --- a/compiler/rustc_lint/src/lints.rs +++ b/compiler/rustc_lint/src/lints.rs @@ -1700,7 +1700,7 @@ pub struct UnusedClosure<'a> { // FIXME(davidtwco): this isn't properly translatable because of the // pre/post strings #[derive(LintDiagnostic)] -#[diag(lint_unused_generator)] +#[diag(lint_unused_coroutine)] #[note] pub struct UnusedCoroutine<'a> { pub count: usize, diff --git a/compiler/rustc_lint/src/unused.rs b/compiler/rustc_lint/src/unused.rs index c757bc85021..6b31fb079e0 100644 --- a/compiler/rustc_lint/src/unused.rs +++ b/compiler/rustc_lint/src/unused.rs @@ -257,7 +257,7 @@ impl<'tcx> LateLintPass<'tcx> for UnusedResults { Array(Box<Self>, u64), /// The root of the unused_closures lint. Closure(Span), - /// The root of the unused_generators lint. + /// The root of the unused_coroutines lint. Coroutine(Span), } @@ -352,7 +352,7 @@ impl<'tcx> LateLintPass<'tcx> for UnusedResults { ty::Closure(..) => Some(MustUsePath::Closure(span)), ty::Coroutine(def_id, ..) => { // async fn should be treated as "implementor of `Future`" - let must_use = if cx.tcx.generator_is_async(def_id) { + let must_use = if cx.tcx.coroutine_is_async(def_id) { let def_id = cx.tcx.lang_items().future_trait()?; is_def_must_use(cx, def_id, span) .map(|inner| MustUsePath::Opaque(Box::new(inner))) | 
