Skip to content

Add generator, async tests with uninhabited saved local#896

Merged
bors merged 1 commit into
rust-lang:masterfrom
tmandry:add-generator-uninhabited-test
Aug 9, 2019
Merged

Add generator, async tests with uninhabited saved local#896
bors merged 1 commit into
rust-lang:masterfrom
tmandry:add-generator-uninhabited-test

Conversation

@tmandry

@tmandry tmandry commented Aug 7, 2019

Copy link
Copy Markdown
Member

See discussion in rust-lang/rust#63035.

@RalfJung

RalfJung commented Aug 8, 2019

Copy link
Copy Markdown
Member

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
Copy Markdown
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

RalfJung commented Aug 9, 2019

Copy link
Copy Markdown
Member

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

@bors r+

@bors

bors commented Aug 9, 2019

Copy link
Copy Markdown
Contributor

📌 Commit f544721 has been approved by RalfJung

@bors

bors commented Aug 9, 2019

Copy link
Copy Markdown
Contributor

⌛ 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

bors commented Aug 9, 2019

Copy link
Copy Markdown
Contributor

☀️ 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