Files
rust/src/libcore
bors 4e4d49d60f Auto merge of #70831 - sfackler:shrink-future-stack, r=matthewjasper
Remove a stack frame from .await calls

The stack frames when `.await`ing one async fn from another currently look like this:

```
  12: foo::b::{{closure}}
             at src/main.rs:2
  13: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /home/sfackler/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/future/mod.rs:66
  14: core::future::poll_with_context
             at /home/sfackler/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src/libcore/future/mod.rs:84
  15: foo::a::{{closure}}
             at src/main.rs:6
```

Since the move away from using TLS to pass the Context around, it's now easy to remove frame 14 by removing poll_with_context in favor of calling Future::poll directly. This still leaves the `GenFuture` frame, but that seems significantly harder to deal with.

It also improves diagnostics a bit since they no longer talk about the private poll_with_context function.
2020-04-16 09:13:07 +00:00
..
2020-04-03 08:22:31 +02:00
2020-03-31 19:01:48 +02:00
2020-04-06 22:44:51 +02:00
2020-04-11 12:56:25 +02:00
2020-03-26 15:49:22 +00:00
2020-04-14 23:51:03 +09:00
2020-04-13 22:25:15 +08:00
2020-04-06 23:08:12 +02:00
2020-04-11 12:56:25 +02:00
2019-11-26 23:02:11 -08:00
2019-12-22 17:42:47 -05:00
2019-11-26 23:02:11 -08:00
2019-12-22 17:42:47 -05:00
2020-03-10 10:31:03 +01:00
2020-03-06 15:19:31 +01:00
2020-02-23 23:59:39 -08:00
2019-11-26 23:02:11 -08:00
2019-11-26 23:02:11 -08:00