ice: E0277 points at nonexisting `.await`
matthiaskrgr opened this issue · 4 comments
Code
rustc --edition=2018 file.rs
// --edition 2018
fn main() {
await{}()
}
the zero sized span at the .await
causes the debug ice
error[E0277]: `()` is not a future
--> treereduce2.out:4:5
|
4 | await{}()
| ^^^^^ - help: remove the `.await`
| |
| `()` is not a future
|
Meta
rustc --version --verbose
:
330727467b8fdf2c43b95095a0efae7012c4f83b with debug assertions
Error output
error: incorrect use of `await`
--> treereduce2.out:4:5
|
4 | await{}()
| ^^^^^^^ help: `await` is a postfix operation: `{}.await`
error[E0728]: `await` is only allowed inside `async` functions and blocks
--> treereduce2.out:4:5
|
3 | fn main() {
| ---- this is not `async`
4 | await{}()
| ^^^^^ only allowed inside `async` functions and blocks
error[E0277]: `()` is not a future
--> treereduce2.out:4:5
|
4 | await{}()
| ^^^^^ - help: remove the `.await`
| |
| `()` is not a future
|
= help: the trait `Future` is not implemented for `()`
= note: () must be a future or must implement `IntoFuture` to be awaited
= note: required for `()` to implement `IntoFuture`
error: aborting due to 3 previous errors
Some errors have detailed explanations: E0277, E0728.
For more information about an error, try `rustc --explain E0277`.
Backtrace
thread 'rustc' panicked at 'Span must not be empty and have no suggestion', /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_errors/src/diagnostic.rs:706:9
stack backtrace:
0: 0x7f98172871c6 - std::backtrace_rs::backtrace::libunwind::trace::h3b6f3958cfae5377
at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
1: 0x7f98172871c6 - std::backtrace_rs::backtrace::trace_unsynchronized::hba0866c62f865804
at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x7f98172871c6 - std::sys_common::backtrace::_print_fmt::h461d5205fa46ab52
at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/sys_common/backtrace.rs:65:5
3: 0x7f98172871c6 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hd23e0c88b75add1c
at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/sys_common/backtrace.rs:44:22
4: 0x7f981734b838 - core::fmt::rt::Argument::fmt::h4f8c28fcc5e0c6ce
at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/fmt/rt.rs:138:9
5: 0x7f981734b838 - core::fmt::write::h7d46c21d618fb808
at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/fmt/mod.rs:1094:21
6: 0x7f98172c34df - std::io::Write::write_fmt::he0c42c5b1963312d
at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/io/mod.rs:1714:15
7: 0x7f9817286fc5 - std::sys_common::backtrace::_print::ha09d072c418bb9f3
at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/sys_common/backtrace.rs:47:5
8: 0x7f9817286fc5 - std::sys_common::backtrace::print::h62c64c91ab9fc24c
at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/sys_common/backtrace.rs:34:9
9: 0x7f98172e143c - std::panicking::default_hook::{{closure}}::h80ca51e5ae0d6e99
10: 0x7f98172e1119 - std::panicking::default_hook::h52195cc8274e026a
at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/panicking.rs:288:9
11: 0x7f9818e8330b - <alloc[59fef786b468a15e]::boxed::Box<dyn for<'a, 'b> core[ad2aefeb2646d5e0]::ops::function::Fn<(&'a core[ad2aefeb2646d5e0]::panic::panic_info::PanicInfo<'b>,), Output = ()> + core[ad2aefeb2646d5e0]::marker::Sync + core[ad2aefeb2646d5e0]::marker::Send> as core[ad2aefeb2646d5e0]::ops::function::Fn<(&core[ad2aefeb2646d5e0]::panic::panic_info::PanicInfo,)>>::call
at /home/matthias/vcs/github/rust_debug_assertions/library/alloc/src/boxed.rs:2024:9
12: 0x7f9818e8330b - rustc_driver_impl[df9a94172e917073]::install_ice_hook::{closure#0}
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_driver_impl/src/lib.rs:1303:13
13: 0x7f98172e1c15 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h69c000f778b2bc36
at /home/matthias/vcs/github/rust_debug_assertions/library/alloc/src/boxed.rs:2024:9
14: 0x7f98172e1c15 - std::panicking::rust_panic_with_hook::hb1c4833de90b47ba
at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/panicking.rs:709:13
15: 0x7f9817287491 - std::panicking::begin_panic_handler::{{closure}}::h4c87999714b0dc12
at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/panicking.rs:595:13
16: 0x7f98172872a6 - std::sys_common::backtrace::__rust_end_short_backtrace::h66b7903c065a3e86
at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/sys_common/backtrace.rs:151:18
17: 0x7f98172e1782 - rust_begin_unwind
at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/panicking.rs:593:5
18: 0x7f9817281433 - core::panicking::panic_fmt::hb3d3573ea68cbca7
at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/panicking.rs:67:14
19: 0x7f981b19b3e0 - <rustc_errors[56ab9bb9c5bf08f1]::diagnostic::Diagnostic>::span_suggestion_with_style::<&str, &str>
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_errors/src/diagnostic.rs:706:9
20: 0x7f981b27605b - <rustc_errors[56ab9bb9c5bf08f1]::diagnostic::Diagnostic>::span_suggestion::<&str, &str>
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_errors/src/diagnostic.rs:687:9
21: 0x7f981b27605b - <rustc_infer[bbddb35e20e57be7]::infer::error_reporting::TypeErrCtxt as rustc_trait_selection[99a87dbe658f5ec3]::traits::error_reporting::suggestions::TypeErrCtxtExt>::suggest_remove_await
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs:1631:21
22: 0x7f981b28a52a - <rustc_infer[bbddb35e20e57be7]::infer::error_reporting::TypeErrCtxt as rustc_trait_selection[99a87dbe658f5ec3]::traits::error_reporting::TypeErrCtxtExt>::report_selection_error
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs:897:25
23: 0x7f981b29aa19 - <rustc_infer[bbddb35e20e57be7]::infer::error_reporting::TypeErrCtxt as rustc_trait_selection[99a87dbe658f5ec3]::traits::error_reporting::InferCtxtPrivExt>::report_fulfillment_error
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs:1534:17
24: 0x7f981b286e13 - <rustc_infer[bbddb35e20e57be7]::infer::error_reporting::TypeErrCtxt as rustc_trait_selection[99a87dbe658f5ec3]::traits::error_reporting::TypeErrCtxtExt>::report_fulfillment_errors
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs:475:21
25: 0x7f98193fbaf9 - <rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::select_obligations_where_possible::<<rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::check_argument_types::{closure#1}>
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs:601:13
26: 0x7f98193fbaf9 - <rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::check_argument_types
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs:344:17
27: 0x7f98193bd0e1 - <rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::confirm_builtin_call
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/callee.rs:454:9
28: 0x7f98193bb84c - <rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::check_call
29: 0x7f981945584f - <rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::check_expr_kind
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:338:45
30: 0x7f98193d70fa - <rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:241:18
31: 0x7f98193d70fa - stacker[da3c16f82a086d7c]::maybe_grow::<rustc_middle[1e2433a00aeefc0b]::ty::Ty, <rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}>
at /home/matthias/.cargo/registry/src/index.crates.io-6f17d22bba15001f/stacker-0.1.15/src/lib.rs:55:9
32: 0x7f98193d70fa - rustc_data_structures[218407984dcef0d]::stack::ensure_sufficient_stack::<rustc_middle[1e2433a00aeefc0b]::ty::Ty, <rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}>
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_data_structures/src/stack.rs:17:5
33: 0x7f98193d70fa - <rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:237:18
34: 0x7f98194549e9 - <rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::check_expr_with_expectation
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:191:9
35: 0x7f981944830f - <rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::check_expr_meets_expectation_or_error::<<rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::demand_scrutinee_type::{closure#0}>
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:84:22
36: 0x7f981944830f - <rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::check_expr_has_type_or_error::<<rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::demand_scrutinee_type::{closure#0}>
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:74:9
37: 0x7f981944830f - <rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::demand_scrutinee_type
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/_match.rs:489:13
38: 0x7f981944830f - <rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::check_match::{closure#0}
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/_match.rs:27:28
39: 0x7f981944830f - <rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::check_match
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/_match.rs:23:19
40: 0x7f98194554bd - <rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::check_expr_kind
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:334:17
41: 0x7f98193d70fa - <rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:241:18
42: 0x7f98193d70fa - stacker[da3c16f82a086d7c]::maybe_grow::<rustc_middle[1e2433a00aeefc0b]::ty::Ty, <rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}>
at /home/matthias/.cargo/registry/src/index.crates.io-6f17d22bba15001f/stacker-0.1.15/src/lib.rs:55:9
43: 0x7f98193d70fa - rustc_data_structures[218407984dcef0d]::stack::ensure_sufficient_stack::<rustc_middle[1e2433a00aeefc0b]::ty::Ty, <rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}>
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_data_structures/src/stack.rs:17:5
44: 0x7f98193d70fa - <rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:237:18
45: 0x7f98194549e9 - <rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::check_expr_with_expectation
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:191:9
46: 0x7f98193ba6a7 - <rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::check_expr
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:164:9
47: 0x7f98193ba6a7 - <rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::check_call
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/callee.rs:89:18
48: 0x7f981945584f - <rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::check_expr_kind
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:338:45
49: 0x7f98193d70fa - <rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:241:18
50: 0x7f98193d70fa - stacker[da3c16f82a086d7c]::maybe_grow::<rustc_middle[1e2433a00aeefc0b]::ty::Ty, <rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}>
at /home/matthias/.cargo/registry/src/index.crates.io-6f17d22bba15001f/stacker-0.1.15/src/lib.rs:55:9
51: 0x7f98193d70fa - rustc_data_structures[218407984dcef0d]::stack::ensure_sufficient_stack::<rustc_middle[1e2433a00aeefc0b]::ty::Ty, <rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}>
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_data_structures/src/stack.rs:17:5
52: 0x7f98193d70fa - <rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:237:18
53: 0x7f98194549e9 - <rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::check_expr_with_expectation
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:191:9
54: 0x7f981940599d - <rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::check_block_with_expected::{closure#0}::{closure#0}
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs:1589:44
55: 0x7f981940599d - <core[ad2aefeb2646d5e0]::option::Option<&rustc_hir[960286a409f19beb]::hir::Expr>>::map::<(&rustc_hir[960286a409f19beb]::hir::Expr, rustc_middle[1e2433a00aeefc0b]::ty::Ty), <rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::check_block_with_expected::{closure#0}::{closure#0}>
at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/option.rs:1075:29
56: 0x7f981940599d - <rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::check_block_with_expected::{closure#0}
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs:1589:26
57: 0x7f981940599d - <rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::with_breakable_ctxt::<<rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::check_block_with_expected::{closure#0}, ()>
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs:1523:22
58: 0x7f981940599d - <rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::check_block_with_expected
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs:1581:26
59: 0x7f981945547a - <rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::check_expr_kind
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:337:41
60: 0x7f98193d70fa - <rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:241:18
61: 0x7f98193d70fa - stacker[da3c16f82a086d7c]::maybe_grow::<rustc_middle[1e2433a00aeefc0b]::ty::Ty, <rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}>
at /home/matthias/.cargo/registry/src/index.crates.io-6f17d22bba15001f/stacker-0.1.15/src/lib.rs:55:9
62: 0x7f98193d70fa - rustc_data_structures[218407984dcef0d]::stack::ensure_sufficient_stack::<rustc_middle[1e2433a00aeefc0b]::ty::Ty, <rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args::{closure#0}>
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_data_structures/src/stack.rs:17:5
63: 0x7f98193d70fa - <rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:237:18
64: 0x7f98194549e9 - <rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::check_expr_with_expectation
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:191:9
65: 0x7f98193d8eff - <rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::check_expr_with_hint
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:143:9
66: 0x7f98193d8eff - <rustc_hir_typeck[57dbf10003e91c2a]::fn_ctxt::FnCtxt>::check_return_expr
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/expr.rs:824:30
67: 0x7f98195001fa - rustc_hir_typeck[57dbf10003e91c2a]::check::check_fn
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/check.rs:117:5
68: 0x7f98195bac44 - rustc_hir_typeck[57dbf10003e91c2a]::typeck_with_fallback::<rustc_hir_typeck[57dbf10003e91c2a]::typeck::{closure#0}>::{closure#0}
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/lib.rs:214:9
69: 0x7f98195bac44 - rustc_hir_typeck[57dbf10003e91c2a]::typeck_with_fallback::<rustc_hir_typeck[57dbf10003e91c2a]::typeck::{closure#0}>
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/lib.rs:174:36
70: 0x7f98195bac44 - rustc_hir_typeck[57dbf10003e91c2a]::typeck
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_hir_typeck/src/lib.rs:156:5
71: 0x7f981a96bd43 - rustc_query_impl[7a0377d14470f94a]::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_impl/src/plumbing.rs:582:47
72: 0x7f981a96bd43 - rustc_query_impl[7a0377d14470f94a]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[7a0377d14470f94a]::query_impl::typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[1e2433a00aeefc0b]::query::erase::Erased<[u8; 8usize]>>
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_impl/src/plumbing.rs:506:18
73: 0x7f981aaac6eb - rustc_query_impl[7a0377d14470f94a]::query_impl::typeck::dynamic_query::{closure#2}
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_impl/src/plumbing.rs:578:25
74: 0x7f981aaac6eb - <rustc_query_impl[7a0377d14470f94a]::query_impl::typeck::dynamic_query::{closure#2} as core[ad2aefeb2646d5e0]::ops::function::FnOnce<(rustc_middle[1e2433a00aeefc0b]::ty::context::TyCtxt, rustc_span[25f1549394aec581]::def_id::LocalDefId)>>::call_once
at /home/matthias/vcs/github/rust_debug_assertions/library/core/src/ops/function.rs:250:5
75: 0x7f981a907926 - <rustc_query_impl[7a0377d14470f94a]::DynamicConfig<rustc_query_system[b0609e3a42ded90a]::query::caches::VecCache<rustc_span[25f1549394aec581]::def_id::LocalDefId, rustc_middle[1e2433a00aeefc0b]::query::erase::Erased<[u8; 8usize]>>, false, false, false> as rustc_query_system[b0609e3a42ded90a]::query::config::QueryConfig<rustc_query_impl[7a0377d14470f94a]::plumbing::QueryCtxt>>::compute
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_impl/src/lib.rs:116:9
76: 0x7f981a907926 - rustc_query_system[b0609e3a42ded90a]::query::plumbing::execute_job_non_incr::<rustc_query_impl[7a0377d14470f94a]::DynamicConfig<rustc_query_system[b0609e3a42ded90a]::query::caches::VecCache<rustc_span[25f1549394aec581]::def_id::LocalDefId, rustc_middle[1e2433a00aeefc0b]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[7a0377d14470f94a]::plumbing::QueryCtxt>::{closure#0}
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_system/src/query/plumbing.rs:487:72
77: 0x7f981a907926 - rustc_middle[1e2433a00aeefc0b]::ty::context::tls::enter_context::<rustc_query_system[b0609e3a42ded90a]::query::plumbing::execute_job_non_incr<rustc_query_impl[7a0377d14470f94a]::DynamicConfig<rustc_query_system[b0609e3a42ded90a]::query::caches::VecCache<rustc_span[25f1549394aec581]::def_id::LocalDefId, rustc_middle[1e2433a00aeefc0b]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[7a0377d14470f94a]::plumbing::QueryCtxt>::{closure#0}, rustc_middle[1e2433a00aeefc0b]::query::erase::Erased<[u8; 8usize]>>::{closure#0}
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context/tls.rs:82:9
78: 0x7f981a907926 - <std[1f7b3825eda736b9]::thread::local::LocalKey<core[ad2aefeb2646d5e0]::cell::Cell<*const ()>>>::try_with::<rustc_middle[1e2433a00aeefc0b]::ty::context::tls::enter_context<rustc_query_system[b0609e3a42ded90a]::query::plumbing::execute_job_non_incr<rustc_query_impl[7a0377d14470f94a]::DynamicConfig<rustc_query_system[b0609e3a42ded90a]::query::caches::VecCache<rustc_span[25f1549394aec581]::def_id::LocalDefId, rustc_middle[1e2433a00aeefc0b]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[7a0377d14470f94a]::plumbing::QueryCtxt>::{closure#0}, rustc_middle[1e2433a00aeefc0b]::query::erase::Erased<[u8; 8usize]>>::{closure#0}, rustc_middle[1e2433a00aeefc0b]::query::erase::Erased<[u8; 8usize]>>
at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/thread/local.rs:270:16
79: 0x7f981a907926 - <std[1f7b3825eda736b9]::thread::local::LocalKey<core[ad2aefeb2646d5e0]::cell::Cell<*const ()>>>::with::<rustc_middle[1e2433a00aeefc0b]::ty::context::tls::enter_context<rustc_query_system[b0609e3a42ded90a]::query::plumbing::execute_job_non_incr<rustc_query_impl[7a0377d14470f94a]::DynamicConfig<rustc_query_system[b0609e3a42ded90a]::query::caches::VecCache<rustc_span[25f1549394aec581]::def_id::LocalDefId, rustc_middle[1e2433a00aeefc0b]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[7a0377d14470f94a]::plumbing::QueryCtxt>::{closure#0}, rustc_middle[1e2433a00aeefc0b]::query::erase::Erased<[u8; 8usize]>>::{closure#0}, rustc_middle[1e2433a00aeefc0b]::query::erase::Erased<[u8; 8usize]>>
at /home/matthias/vcs/github/rust_debug_assertions/library/std/src/thread/local.rs:246:9
80: 0x7f981a907926 - rustc_middle[1e2433a00aeefc0b]::ty::context::tls::enter_context::<rustc_query_system[b0609e3a42ded90a]::query::plumbing::execute_job_non_incr<rustc_query_impl[7a0377d14470f94a]::DynamicConfig<rustc_query_system[b0609e3a42ded90a]::query::caches::VecCache<rustc_span[25f1549394aec581]::def_id::LocalDefId, rustc_middle[1e2433a00aeefc0b]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[7a0377d14470f94a]::plumbing::QueryCtxt>::{closure#0}, rustc_middle[1e2433a00aeefc0b]::query::erase::Erased<[u8; 8usize]>>
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context/tls.rs:79:9
81: 0x7f981a907926 - <rustc_query_impl[7a0377d14470f94a]::plumbing::QueryCtxt as rustc_query_system[b0609e3a42ded90a]::query::QueryContext>::start_query::<rustc_middle[1e2433a00aeefc0b]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[b0609e3a42ded90a]::query::plumbing::execute_job_non_incr<rustc_query_impl[7a0377d14470f94a]::DynamicConfig<rustc_query_system[b0609e3a42ded90a]::query::caches::VecCache<rustc_span[25f1549394aec581]::def_id::LocalDefId, rustc_middle[1e2433a00aeefc0b]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[7a0377d14470f94a]::plumbing::QueryCtxt>::{closure#0}>::{closure#0}
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_query_impl/src/plumbing.rs:149:13
82: 0x7f981a907926 - rustc_middle[1e2433a00aeefc0b]::ty::context::tls::with_related_context::<<rustc_query_impl[7a0377d14470f94a]::plumbing::QueryCtxt as rustc_query_system[b0609e3a42ded90a]::query::QueryContext>::start_query<rustc_middle[1e2433a00aeefc0b]::query::erase::Erased<[u8; 8usize]>, rustc_query_system[b0609e3a42ded90a]::query::plumbing::execute_job_non_incr<rustc_query_impl[7a0377d14470f94a]::DynamicConfig<rustc_query_system[b0609e3a42ded90a]::query::caches::VecCache<rustc_span[25f1549394aec581]::def_id::LocalDefId, rustc_middle[1e2433a00aeefc0b]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[7a0377d14470f94a]::plumbing::QueryCtxt>::{closure#0}>::{closure#0}, rustc_middle[1e2433a00aeefc0b]::query::erase::Erased<[u8; 8usize]>>::{closure#0}
at /home/matthias/vcs/github/rust_debug_assertions/compiler/rustc_middle/src/ty/context/tls.rs:133:9
This is because the parser recovers from an incorrect await
invocation, while the suggestion creates a new Span
to include the .
. The solution would likely be to either signal that it was a recovered await. Maybe just by replacing the whole thing with an error AST placeholder, or to include a Span
in the AST that includes the dot to avoid other issues. I think the first solution is likely better, it would silence any errors in the expression being awaited, but that should be fine in general.
Hi guys, I can take this?
Go ahead, @Alef-gabriel! I believe all you'd have to do is change Parser::recover_incorrect_await_syntax
to always return self.mk_expr(span, ExprKind::Err)
instead of trying to recover.
@rustbot claim