diff --git a/async-stream-impl/src/lib.rs b/async-stream-impl/src/lib.rs index 42252ce..d6fcdca 100644 --- a/async-stream-impl/src/lib.rs +++ b/async-stream-impl/src/lib.rs @@ -129,7 +129,7 @@ impl VisitMut for Scrub<'_> { { #[allow(unreachable_code)] if false { - break 'check_stream_scope (loop {}); + break '__async_stream_private_check_scope (loop {}); } #yield_expr } @@ -234,7 +234,7 @@ pub fn stream_inner(input: TokenStream) -> TokenStream { quote!({ let (mut __yield_tx, __yield_rx) = unsafe { #crate_path::__private::yielder::pair() }; #crate_path::__private::AsyncStream::new(__yield_rx, async move { - 'check_stream_scope: { + '__async_stream_private_check_scope: { #dummy_yield #(#stmts)* } @@ -270,7 +270,7 @@ pub fn try_stream_inner(input: TokenStream) -> TokenStream { quote!({ let (mut __yield_tx, __yield_rx) = unsafe { #crate_path::__private::yielder::pair() }; #crate_path::__private::AsyncStream::new(__yield_rx, async move { - 'check_stream_scope: { + '__async_stream_private_check_scope: { #dummy_yield #(#stmts)* } diff --git a/async-stream/tests/ui/unsoundness_issue_106.stderr b/async-stream/tests/ui/unsoundness_issue_106.stderr index 5802a70..0c0214c 100644 --- a/async-stream/tests/ui/unsoundness_issue_106.stderr +++ b/async-stream/tests/ui/unsoundness_issue_106.stderr @@ -1,36 +1,36 @@ -error[E0767]: use of unreachable label `'check_stream_scope` - --> tests/ui/unsoundness_issue_106.rs:15:10 +error[E0767]: use of unreachable label `'__async_stream_private_check_scope` + --> tests/ui/unsoundness_issue_106.rs:14:10 | -15 | pin!(stream! { +14 | pin!(stream! { | __________^ -16 | | let yield_42 = asynk!(yield 42_usize); -17 | | let s = stream! { -18 | | yield Box::new(12345); +15 | | let yield_42 = asynk!(yield 42_usize); +16 | | let s = stream! { +17 | | yield Box::new(12345); ... | -27 | | } -28 | | }) +26 | | } +27 | | }) | | ^ | | | - | |_____unreachable label `'check_stream_scope` + | |_____unreachable label `'__async_stream_private_check_scope` | unreachable label defined here | = note: labels are unreachable through functions, closures, async blocks and modules = note: this error originates in the macro `$crate::__private::stream_inner` which comes from the expansion of the macro `stream` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0267]: `break` inside `async` block - --> tests/ui/unsoundness_issue_106.rs:15:10 + --> tests/ui/unsoundness_issue_106.rs:14:10 | 8 | async { $e } | ----- enclosing `async` block ... -15 | pin!(stream! { +14 | pin!(stream! { | __________^ -16 | | let yield_42 = asynk!(yield 42_usize); -17 | | let s = stream! { -18 | | yield Box::new(12345); +15 | | let yield_42 = asynk!(yield 42_usize); +16 | | let s = stream! { +17 | | yield Box::new(12345); ... | -27 | | } -28 | | }) +26 | | } +27 | | }) | |_____^ cannot `break` inside `async` block | = note: this error originates in the macro `$crate::__private::stream_inner` which comes from the expansion of the macro `stream` (in Nightly builds, run with -Z macro-backtrace for more info)