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:🅱️:{{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:🅰️:{{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
..
alloc Update mod.rs 2020-04-03 08:22:31 +02:00
array fix internal lint fallout 2020-03-31 19:01:48 +02:00
benches Use assoc float consts in libcore 2020-04-06 22:44:51 +02:00
char Store UNICODE_VERSION as a tuple 2020-04-11 12:56:25 +02:00
convert Rollup merge of #70487 - Mark-Simulacrum:float-unchecked-casts, r=SimonSapin 2020-04-03 00:32:00 +02:00
fmt Replace max/min_value() with MAX/MIN assoc consts 2020-04-03 09:33:10 +02:00
future Remove a stack frame from .await calls 2020-04-05 18:51:21 -07:00
hash Rollup merge of #69471 - nnethercote:rm-sip-Hasher-short_write, r=dtolnay 2020-03-15 02:44:15 +01:00
iter Avoid extra &mut in Chain::fold and try_fold 2020-04-07 16:58:52 -07:00
macros Expand on platform details of include_xxx macros 2020-04-02 16:34:43 +02:00
mem Auto merge of #69079 - CAD97:layout-of-ptr, r=RalfJung 2020-03-22 18:37:19 +00:00
num Make libcore float constant examples similar to libstd 2020-04-05 12:20:27 +02:00
ops Remove the last remnant of unsigned Neg 2020-04-13 18:37:06 -07:00
prelude Rename asm! to llvm_asm! 2020-03-26 15:49:22 +00:00
ptr ptr: add tracking issue for len() method on raw slices 2020-04-14 21:34:27 +02:00
slice Tighten time complexity on the doc 2020-04-14 23:51:03 +09:00
str Add examples to Pattern docs 2020-04-13 22:25:15 +08:00
sync Use copy bound in atomic operations to generate simpler MIR 2020-03-18 00:47:08 +01:00
task Use matches macro in libcore and libstd 2020-01-08 07:10:28 +03:00
tests Use integer assoc consts in libcore 2020-04-06 23:08:12 +02:00
unicode Store UNICODE_VERSION as a tuple 2020-04-11 12:56:25 +02:00
any.rs get rid of ConstPropUnsupported; use ZST marker structs instead 2020-03-22 12:16:24 +01:00
ascii.rs Format libcore with rustfmt 2019-11-26 23:02:11 -08:00
bool.rs Format libcore with rustfmt (including tests and benches) 2019-12-06 20:20:51 -08:00
borrow.rs Format the world 2019-12-22 17:42:47 -05:00
Cargo.toml Move the matches! macro to the prelude 2019-10-23 15:35:36 +02:00
cell.rs Rollup merge of #70029 - jonas-schievink:bootstrap, r=Centril 2020-03-17 03:05:17 +01:00
clone.rs Minor follow-up after renaming librustc(_middle) 2020-04-03 19:03:13 +09:00
cmp.rs Replace float module consts with assoc consts in documentation 2020-04-03 09:33:10 +02:00
default.rs Format libcore with rustfmt 2019-11-26 23:02:11 -08:00
ffi.rs Require issue = "none" over issue = "0" in unstable attributes 2019-12-21 13:16:18 +02:00
hint.rs Make documentation examples use new integer assoc consts 2020-04-03 09:33:10 +02:00
internal_macros.rs Require issue = "none" over issue = "0" in unstable attributes 2019-12-21 13:16:18 +02:00
intrinsics.rs Replace max/min_value() with MAX/MIN assoc consts 2020-04-03 09:33:10 +02:00
lib.rs Auto merge of #70370 - petrochenkov:nosmatch, r=Centril 2020-03-29 06:33:42 +00:00
marker.rs Minor follow-up after renaming librustc(_middle) 2020-04-03 19:03:13 +09:00
option.rs make "other" in docs of Option::{zip,zip_with} monofont 2020-03-19 22:19:37 +03:00
panic.rs Format the world 2019-12-22 17:42:47 -05:00
panicking.rs also make panic_fmt track_caller 2020-03-10 10:31:03 +01:00
pin.rs fix various typos 2020-03-06 15:19:31 +01:00
primitive.rs Bump core::primitive to 1.43 2020-02-23 23:59:39 -08:00
raw.rs Minor follow-up after renaming librustc(_middle) 2020-04-03 19:03:13 +09:00
result.rs docs: make the description of Result::map_or more clear 2020-04-04 14:18:02 +03:00
time.rs Make documentation examples use new integer assoc consts 2020-04-03 09:33:10 +02:00
tuple.rs Format libcore with rustfmt 2019-11-26 23:02:11 -08:00
unit.rs Format libcore with rustfmt 2019-11-26 23:02:11 -08:00