summary refs log tree commit diff
path: root/src/librustc_ast_lowering/expr.rs
AgeCommit message (Collapse)AuthorLines
2020-04-16Auto merge of #70831 - sfackler:shrink-future-stack, r=matthewjasperbors-11/+34
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-13Use clearer message when obligation is caused by await exprTyler Mandry-2/+2
2020-04-05Remove a stack frame from .await callsSteven Fackler-11/+34
2020-03-26Rename asm! to llvm_asm!Amanieu d'Antras-6/+6
asm! is left as a wrapper around llvm_asm! to maintain compatibility.
2020-03-21lowering: bug! -> panic!Mazdak Farrokhzad-2/+1
2020-03-17Don't create AST fragments when lowering to HIRJonas Schievink-29/+33
2020-03-17Split up large `FnDecl` expressionJonas Schievink-14/+13
2020-03-17Improve comments in HIR lowering codeJonas Schievink-2/+3
2020-03-17FormatJonas Schievink-7/+3
2020-03-17Make async/await lowering use resume argumentsJonas Schievink-19/+76
2020-03-12ast: `Mac`/`Macro` -> `MacCall`Vadim Petrochenkov-1/+1
2020-03-01Rollup merge of #69580 - matthiaskrgr:map_clone, r=CentrilYuki Okushi-1/+1
use .copied() instead of .map(|x| *x) on iterators
2020-02-29Rename `syntax` to `rustc_ast` in source codeVadim Petrochenkov-4/+4
2020-02-29use .copied() instead of .map(|x| *x) on iteratorsMatthias Krüger-1/+1
2020-02-27don't use .into() to convert types into identical types.Matthias Krüger-4/+3
example: let s: String = format!("hello").into();
2020-02-17Rename `FunctionRetTy` to `FnRetTy`Yuki Okushi-4/+4
2020-02-13IsAsync -> enum Async { Yes { span: Span, .. }, No }Mazdak Farrokhzad-1/+1
use new span for better diagnostics.
2020-02-04Update error message with too many parametersJonas Schievink-1/+1
2020-02-02Allow 0 or 1 explicit generator parametersJonas Schievink-2/+2
2020-01-21lowering: cleanup some hofsMazdak Farrokhzad-12/+3
2020-01-18remove rustc_error_codes deps except in rustc_driverMazdak Farrokhzad-1/+0
2020-01-16don't clone types that are copyMatthias Krüger-3/+3
found via clippy
2020-01-10Fix ICE #68058Yuki Okushi-1/+6
2020-01-08- remove syntax::{span_warn!, span_err!, span_fatal!. struct_err!}Mazdak Farrokhzad-5/+13
- remove syntax::{help!, span_help!, span_note!} - remove unused syntax::{struct_span_fatal, struct_span_err_or_warn!, span_err_or_warn!} - lintify check_for_bindings_named_same_as_variants + conflicting_repr_hints - inline syntax::{struct_span_warn!, diagnostic_used!} - stringify_error_code! -> error_code! & use it more. - find_plugin_registrar: de-fatalize an error - de-fatalize metadata errors - move type_error_struct! to rustc_typeck - struct_span_err! -> rustc_errors
2020-01-05Remove rustc_hir reexports in rustc::hir.Mazdak Farrokhzad-2/+2
2020-01-05simplify reexports in rustc::hirMazdak Farrokhzad-4/+4
2019-12-31Revert "core: add IntoFuture trait and support for await"Wesley Wiser-20/+4
This reverts commit f35517ee861dc012ccc26083dd4520045e2c4f6f.
2019-12-31nix `lower_label` identity function.Mazdak Farrokhzad-21/+7
2019-12-31librustc_ast_lowering: fix misc fallout.Mazdak Farrokhzad-9/+9
2019-12-31librustc_ast_lowering: move the files.Mazdak Farrokhzad-0/+1454