Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add generator, async tests with uninhabited saved local #896

Merged
merged 1 commit into from
Aug 9, 2019

Conversation

tmandry
Copy link
Member

@tmandry tmandry commented Aug 7, 2019

See discussion in rust-lang/rust#63035.

@RalfJung
Copy link
Member

RalfJung commented Aug 8, 2019

Thanks! Would be great if you could also update rust-version to ad7c55e1fc55d9af4787b285cec1c64e3480ae84 so that it tests a version of Rust that includes your changes.

let mut fut = includes_never(false, 4);
let waker = unsafe { Waker::from_raw(RawWaker::new(ptr::null(), &RAW_WAKER)) };
let mut context = Context::from_waker(&waker);
assert_eq!(unsafe { Pin::new_unchecked(&mut fut) }.poll(&mut context), Poll::Ready(16));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to move the common parts of these three "run an async fn" tests into a helper function?

I can also do that after landing, though.

@RalfJung
Copy link
Member

RalfJung commented Aug 9, 2019

I think I'll just do that in a follow-up PR. Thanks!

@bors r+

@bors
Copy link
Contributor

bors commented Aug 9, 2019

📌 Commit f544721 has been approved by RalfJung

@bors
Copy link
Contributor

bors commented Aug 9, 2019

⌛ Testing commit f544721 with merge 1766d1b...

bors added a commit that referenced this pull request Aug 9, 2019
Add generator, async tests with uninhabited saved local

See discussion in rust-lang/rust#63035.
@bors
Copy link
Contributor

bors commented Aug 9, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: RalfJung
Pushing 1766d1b to master...

@bors bors merged commit f544721 into rust-lang:master Aug 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants