diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-03-20 05:51:23 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-20 05:51:23 +0100 |
| commit | ffdb147aa470a84d237ca757a115bbc32b2ba642 (patch) | |
| tree | a439e9059ed26c4862ebdbddc8da85dae70660b6 /tests | |
| parent | 2cf93ac9c87ca1a8ff12b263ab1bc29d511faf7e (diff) | |
| parent | 3d56178880a8f03b3d6322930de778d4064790ba (diff) | |
| download | rust-ffdb147aa470a84d237ca757a115bbc32b2ba642.tar.gz rust-ffdb147aa470a84d237ca757a115bbc32b2ba642.zip | |
Rollup merge of #122732 - compiler-errors:coroutine-captures-note, r=nnethercote
Remove redundant coroutine captures note This note is redundant, since we'll always be printing this "captures the following types..." between *more* descriptive `BuiltinDerivedObligationCause`s. Please review with whitespace disabled, since I also removed an unnecessary labeled break.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/async-await/async-await-let-else.stderr | 1 | ||||
| -rw-r--r-- | tests/ui/async-await/issue-68112.stderr | 1 | ||||
| -rw-r--r-- | tests/ui/async-await/issue-70935-complex-spans.stderr | 2 | ||||
| -rw-r--r-- | tests/ui/async-await/issues/issue-67893.stderr | 1 | ||||
| -rw-r--r-- | tests/ui/async-await/partial-drop-partial-reinit.rs | 1 | ||||
| -rw-r--r-- | tests/ui/async-await/partial-drop-partial-reinit.stderr | 5 | ||||
| -rw-r--r-- | tests/ui/coroutine/issue-68112.rs | 1 | ||||
| -rw-r--r-- | tests/ui/coroutine/issue-68112.stderr | 1 | ||||
| -rw-r--r-- | tests/ui/coroutine/print/coroutine-print-verbose-1.stderr | 1 |
9 files changed, 2 insertions, 12 deletions
diff --git a/tests/ui/async-await/async-await-let-else.stderr b/tests/ui/async-await/async-await-let-else.stderr index 057906b49a3..0952be2abe5 100644 --- a/tests/ui/async-await/async-await-let-else.stderr +++ b/tests/ui/async-await/async-await-let-else.stderr @@ -38,7 +38,6 @@ LL | async fn bar2<T>(_: T) -> ! { LL | | panic!() LL | | } | |_^ - = note: required because it captures the following types: `impl Future<Output = !>` note: required because it's used within this `async` fn body --> $DIR/async-await-let-else.rs:18:32 | diff --git a/tests/ui/async-await/issue-68112.stderr b/tests/ui/async-await/issue-68112.stderr index f92ac5dd0bc..96fc1633cc9 100644 --- a/tests/ui/async-await/issue-68112.stderr +++ b/tests/ui/async-await/issue-68112.stderr @@ -58,7 +58,6 @@ note: required because it appears within the type `impl Future<Output = Arc<RefC | LL | fn make_non_send_future2() -> impl Future<Output = Arc<RefCell<i32>>> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: required because it captures the following types: `impl Future<Output = Arc<RefCell<i32>>>`, `Ready<i32>` note: required because it's used within this `async` block --> $DIR/issue-68112.rs:57:20 | diff --git a/tests/ui/async-await/issue-70935-complex-spans.stderr b/tests/ui/async-await/issue-70935-complex-spans.stderr index 8dc3f476ec8..85c0c0c3088 100644 --- a/tests/ui/async-await/issue-70935-complex-spans.stderr +++ b/tests/ui/async-await/issue-70935-complex-spans.stderr @@ -25,7 +25,6 @@ LL | async fn baz<T>(_c: impl FnMut() -> T) where T: Future<Output=()> { | ___________________________________________________________________^ LL | | } | |_^ - = note: required because it captures the following types: `impl Future<Output = ()>` note: required because it's used within this `async` block --> $DIR/issue-70935-complex-spans.rs:18:5 | @@ -63,7 +62,6 @@ LL | async fn baz<T>(_c: impl FnMut() -> T) where T: Future<Output=()> { | ___________________________________________________________________^ LL | | } | |_^ - = note: required because it captures the following types: `impl Future<Output = ()>` note: required because it's used within this `async` block --> $DIR/issue-70935-complex-spans.rs:18:5 | diff --git a/tests/ui/async-await/issues/issue-67893.stderr b/tests/ui/async-await/issues/issue-67893.stderr index 12bbfc12552..0c28aea44bb 100644 --- a/tests/ui/async-await/issues/issue-67893.stderr +++ b/tests/ui/async-await/issues/issue-67893.stderr @@ -12,7 +12,6 @@ LL | pub async fn run() { | ------------------ within this `impl Future<Output = ()>` | = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `MutexGuard<'_, ()>`, which is required by `impl Future<Output = ()>: Send` - = note: required because it captures the following types: `Arc<Mutex<()>>`, `MutexGuard<'_, ()>`, `impl Future<Output = ()>` note: required because it's used within this `async` fn body --> $DIR/auxiliary/issue_67893.rs:9:20 | diff --git a/tests/ui/async-await/partial-drop-partial-reinit.rs b/tests/ui/async-await/partial-drop-partial-reinit.rs index 36b3f2bc9ff..b72552ed324 100644 --- a/tests/ui/async-await/partial-drop-partial-reinit.rs +++ b/tests/ui/async-await/partial-drop-partial-reinit.rs @@ -8,7 +8,6 @@ fn main() { //~| NOTE cannot be sent //~| NOTE bound introduced by //~| NOTE appears within the type - //~| NOTE captures the following types } fn gimme_send<T: Send>(t: T) { diff --git a/tests/ui/async-await/partial-drop-partial-reinit.stderr b/tests/ui/async-await/partial-drop-partial-reinit.stderr index a6140c6db82..0bd7d50b941 100644 --- a/tests/ui/async-await/partial-drop-partial-reinit.stderr +++ b/tests/ui/async-await/partial-drop-partial-reinit.stderr @@ -11,9 +11,8 @@ LL | async fn foo() { | = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `NotSend`, which is required by `impl Future<Output = ()>: Send` = note: required because it appears within the type `(NotSend,)` - = note: required because it captures the following types: `(NotSend,)`, `impl Future<Output = ()>` note: required because it's used within this `async` fn body - --> $DIR/partial-drop-partial-reinit.rs:28:16 + --> $DIR/partial-drop-partial-reinit.rs:27:16 | LL | async fn foo() { | ________________^ @@ -25,7 +24,7 @@ LL | | bar().await; LL | | } | |_^ note: required by a bound in `gimme_send` - --> $DIR/partial-drop-partial-reinit.rs:14:18 + --> $DIR/partial-drop-partial-reinit.rs:13:18 | LL | fn gimme_send<T: Send>(t: T) { | ^^^^ required by this bound in `gimme_send` diff --git a/tests/ui/coroutine/issue-68112.rs b/tests/ui/coroutine/issue-68112.rs index e2be704dab7..ccec2acc976 100644 --- a/tests/ui/coroutine/issue-68112.rs +++ b/tests/ui/coroutine/issue-68112.rs @@ -65,7 +65,6 @@ fn test2() { //~^ ERROR `RefCell<i32>` cannot be shared between threads safely //~| NOTE `RefCell<i32>` cannot be shared between threads safely //~| NOTE required for - //~| NOTE captures the following types //~| NOTE use `std::sync::RwLock` instead } diff --git a/tests/ui/coroutine/issue-68112.stderr b/tests/ui/coroutine/issue-68112.stderr index ded325eda54..443195d36a3 100644 --- a/tests/ui/coroutine/issue-68112.stderr +++ b/tests/ui/coroutine/issue-68112.stderr @@ -44,7 +44,6 @@ note: required because it appears within the type `impl Coroutine<Return = Arc<R | LL | fn make_non_send_coroutine2() -> impl Coroutine<Return = Arc<RefCell<i32>>> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: required because it captures the following types: `impl Coroutine<Return = Arc<RefCell<i32>>>` note: required because it's used within this coroutine --> $DIR/issue-68112.rs:60:20 | diff --git a/tests/ui/coroutine/print/coroutine-print-verbose-1.stderr b/tests/ui/coroutine/print/coroutine-print-verbose-1.stderr index 1b9ca632f0c..37db83d57f7 100644 --- a/tests/ui/coroutine/print/coroutine-print-verbose-1.stderr +++ b/tests/ui/coroutine/print/coroutine-print-verbose-1.stderr @@ -43,7 +43,6 @@ note: required because it appears within the type `Opaque(DefId(0:36 ~ coroutine | LL | fn make_non_send_coroutine2() -> impl Coroutine<Return = Arc<RefCell<i32>>> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: required because it captures the following types: `Opaque(DefId(0:36 ~ coroutine_print_verbose_1[75fb]::make_non_send_coroutine2::{opaque#0}), [])` note: required because it's used within this coroutine --> $DIR/coroutine-print-verbose-1.rs:52:20 | |
