-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Closed
Labels
A-async-awaitArea: Async & AwaitArea: Async & AwaitAsyncAwait-TriagedAsync-await issues that have been triaged during a working group meeting.Async-await issues that have been triaged during a working group meeting.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Using rustc 1.36.0-nightly (3991285 2019-04-25), the following test compiles to ud2
, when using the following command: rustc --edition=2018 -Copt-level=z -Cdebuginfo=2 --test test.rs -o test
. Both the opt-level
and debuginfo
are necessary to get ud2
.
#![feature(async_await, await_macro)]
#![allow(unused)]
#[cfg(test)]
mod tests {
use std::future::Future;
use std::task::Poll;
use std::task::Context;
use std::pin::Pin;
use std::rc::Rc;
struct Never();
impl Future for Never {
type Output = ();
fn poll(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<Self::Output> {
Poll::Pending
}
}
#[test]
fn crashing_test() {
let fut = async {
let _rc = Rc::new(()); // Also crashes with Arc
await!(Never());
};
let _bla = fut; // Moving the future is required.
}
}
Metadata
Metadata
Assignees
Labels
A-async-awaitArea: Async & AwaitArea: Async & AwaitAsyncAwait-TriagedAsync-await issues that have been triaged during a working group meeting.Async-await issues that have been triaged during a working group meeting.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.