From 92b41eeee6ffef609e2216dd145c88ba0fb14102 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Wed, 25 Oct 2023 16:26:36 +0000 Subject: [PATCH] Rename in preparation for moving the `async` printing out of `CoroutineSource` --- compiler/rustc_hir/src/hir.rs | 2 +- tests/ui/async-await/async-await-let-else.stderr | 4 ++-- tests/ui/async-await/issue-68112.stderr | 2 +- tests/ui/async-await/issue-70935-complex-spans.stderr | 2 +- tests/ui/async-await/issues/issue-67893.stderr | 2 +- tests/ui/async-await/partial-drop-partial-reinit.rs | 2 +- tests/ui/async-await/partial-drop-partial-reinit.stderr | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/compiler/rustc_hir/src/hir.rs b/compiler/rustc_hir/src/hir.rs index 0e14a0e4346..e39ddd8f284 100644 --- a/compiler/rustc_hir/src/hir.rs +++ b/compiler/rustc_hir/src/hir.rs @@ -1568,7 +1568,7 @@ pub fn descr(&self) -> &'static str { match self { CoroutineSource::Block => "`async` block", CoroutineSource::Closure => "`async` closure body", - CoroutineSource::Fn => "`async fn` body", + CoroutineSource::Fn => "`async` fn body", } } } diff --git a/tests/ui/async-await/async-await-let-else.stderr b/tests/ui/async-await/async-await-let-else.stderr index c3b4e761824..b360aab6b59 100644 --- a/tests/ui/async-await/async-await-let-else.stderr +++ b/tests/ui/async-await/async-await-let-else.stderr @@ -30,7 +30,7 @@ LL | is_send(foo2(Some(true))); | required by a bound introduced by this call | = help: within `impl Future`, the trait `Send` is not implemented for `Rc<()>` -note: required because it's used within this `async fn` body +note: required because it's used within this `async` fn body --> $DIR/async-await-let-else.rs:24:29 | LL | async fn bar2(_: T) -> ! { @@ -39,7 +39,7 @@ LL | | panic!() LL | | } | |_^ = note: required because it captures the following types: `impl Future` -note: required because it's used within this `async fn` body +note: required because it's used within this `async` fn body --> $DIR/async-await-let-else.rs:18:32 | LL | async fn foo2(x: Option) { diff --git a/tests/ui/async-await/issue-68112.stderr b/tests/ui/async-await/issue-68112.stderr index 17b619ebee3..1cd8beac260 100644 --- a/tests/ui/async-await/issue-68112.stderr +++ b/tests/ui/async-await/issue-68112.stderr @@ -45,7 +45,7 @@ LL | require_send(send_fut); = help: the trait `Sync` is not implemented for `RefCell` = note: if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` instead = note: required for `Arc>` to implement `Send` -note: required because it's used within this `async fn` body +note: required because it's used within this `async` fn body --> $DIR/issue-68112.rs:47:31 | LL | async fn ready2(t: T) -> T { diff --git a/tests/ui/async-await/issue-70935-complex-spans.stderr b/tests/ui/async-await/issue-70935-complex-spans.stderr index ab834daa85d..d0605d7e1a6 100644 --- a/tests/ui/async-await/issue-70935-complex-spans.stderr +++ b/tests/ui/async-await/issue-70935-complex-spans.stderr @@ -18,7 +18,7 @@ note: required because it's used within this closure | LL | baz(|| async { | ^^ -note: required because it's used within this `async fn` body +note: required because it's used within this `async` fn body --> $DIR/issue-70935-complex-spans.rs:12:67 | LL | async fn baz(_c: impl FnMut() -> T) where T: Future { diff --git a/tests/ui/async-await/issues/issue-67893.stderr b/tests/ui/async-await/issues/issue-67893.stderr index 3d6d1fb5c09..2a712aee9c4 100644 --- a/tests/ui/async-await/issues/issue-67893.stderr +++ b/tests/ui/async-await/issues/issue-67893.stderr @@ -13,7 +13,7 @@ LL | pub async fn run() { | = help: within `impl Future`, the trait `Send` is not implemented for `MutexGuard<'_, ()>` = note: required because it captures the following types: `Arc>`, `MutexGuard<'_, ()>`, `impl Future` -note: required because it's used within this `async fn` body +note: required because it's used within this `async` fn body --> $DIR/auxiliary/issue_67893.rs:9:20 | LL | pub async fn run() { diff --git a/tests/ui/async-await/partial-drop-partial-reinit.rs b/tests/ui/async-await/partial-drop-partial-reinit.rs index 75acb442e7a..815cc916b41 100644 --- a/tests/ui/async-await/partial-drop-partial-reinit.rs +++ b/tests/ui/async-await/partial-drop-partial-reinit.rs @@ -26,7 +26,7 @@ fn drop(&mut self) {} impl !Send for NotSend {} async fn foo() { - //~^ NOTE used within this `async fn` body + //~^ NOTE used within this `async` fn body //~| NOTE within this `impl Future let mut x = (NotSend {},); drop(x.0); diff --git a/tests/ui/async-await/partial-drop-partial-reinit.stderr b/tests/ui/async-await/partial-drop-partial-reinit.stderr index d115c1b1cc4..310a2923955 100644 --- a/tests/ui/async-await/partial-drop-partial-reinit.stderr +++ b/tests/ui/async-await/partial-drop-partial-reinit.stderr @@ -12,7 +12,7 @@ LL | async fn foo() { = help: within `impl Future`, the trait `Send` is not implemented for `NotSend` = note: required because it appears within the type `(NotSend,)` = note: required because it captures the following types: `(NotSend,)`, `impl Future` -note: required because it's used within this `async fn` body +note: required because it's used within this `async` fn body --> $DIR/partial-drop-partial-reinit.rs:28:16 | LL | async fn foo() {