Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit da8a39a

Browse files
Failing test
1 parent b3df0d7 commit da8a39a

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
2+
// skip-filecheck
3+
//@ unit-test: Inline
4+
//@ edition: 2021
5+
//@ compile-flags: -Zinline-mir-hint-threshold=10000 -Zinline-mir-threshold=10000 --crate-type=lib
6+
7+
pub async fn run(permit: ActionPermit<'_, ()>, ctx: &mut core::task::Context<'_>) {
8+
run2(permit, ctx);
9+
}
10+
11+
// EMIT_MIR inline_coroutine_body.run2.Inline.diff
12+
fn run2<T>(permit: ActionPermit<'_, T>, ctx: &mut core::task::Context) {
13+
_ = || {
14+
let mut fut = ActionPermit::perform(permit);
15+
let fut = unsafe { core::pin::Pin::new_unchecked(&mut fut) };
16+
_ = core::future::Future::poll(fut, ctx);
17+
};
18+
}
19+
20+
pub struct ActionPermit<'a, T> {
21+
_guard: core::cell::Ref<'a, T>,
22+
}
23+
24+
impl<'a, T> ActionPermit<'a, T> {
25+
async fn perform(self) {
26+
core::future::ready(()).await
27+
}
28+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /