Closed samlich closed 3 years ago
Note that it ICEs without #[no_std]
as well.
duplicate of https://github.com/rust-lang/rust/issues/77993 ?
duplicate of #77993 ?
I thought this looked different, but it doesn't break on 2020-10-06 nightly, so likely a duplicate.
Code
Removing or making the lifetime static fixes it, as does removing the early return (but not making it conditional). Moving the async part to a standalone function also does not crash.
Undef
can be defined, but doesn't have to be.https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=de619bbd48328b8854fd77e3338dfb3c
Meta
rustc --version --verbose
:Error output
Backtrace
``` thread 'rustc' panicked at 'Box', compiler/rustc_errors/src/lib.rs:945:9 [24/44328]
stack backtrace:
0: std::panicking::begin_panic
1: rustc_errors::HandlerInner::bug
2: rustc_errors::Handler::bug
3: rustc_middle::util::bug::opt_span_bug_fmt::{{closure}}
4: rustc_middle::ty::context::tls::with_opt::{{closure}}
5: rustc_middle::ty::context::tls::with_opt
6: rustc_middle::util::bug::opt_span_bug_fmt
7: rustc_middle::util::bug::bug_fmt
8: rustc_middle::ty::sty::::tuple_fields
9: as rustc_middle::ty::fold::TypeVisitor>::visit_ty
10: rustc_middle::ty::fold::TypeFoldable::visit_with
11: rustc_middle::ty::structural_impls::::super_visit_with
12: as rustc_middle::ty::fold::TypeVisitor>::visit_ty
13: ::constrain_opaque_types
14: rustc_typeck::check::regionck::RegionCtxt::visit_fn_body
15: rustc_hir::intravisit::walk_expr
16: ::visit_expr
17: rustc_hir::intravisit::walk_expr
18: ::visit_expr
19: ::visit_expr
20: rustc_typeck::check::regionck::RegionCtxt::visit_fn_body
21: rustc_typeck::check::regionck::::regionck_fn
22: rustc_infer::infer::InferCtxtBuilder::enter
23: rustc_typeck::check::typeck
24: rustc_middle::ty::query:: for rustc_middle::ty::query::queries::typeck>::compute
25: rustc_middle::dep_graph::::with_deps
26: rustc_query_system::dep_graph::graph::DepGraph::with_task_impl
27: rustc_data_structures::stack::ensure_sufficient_stack
28: rustc_query_system::query::plumbing::get_query_impl
29: rustc_typeck::collect::type_of::find_opaque_ty_constraints::ConstraintLocator::check
30: rustc_hir::intravisit::walk_impl_item_ref
31: rustc_hir::intravisit::walk_item
32: rustc_typeck::collect::type_of::type_of
33: rustc_middle::ty::query:: for rustc_middle::ty::query::queries::type_of>::compute
34: rustc_middle::dep_graph::::with_deps
35: rustc_query_system::dep_graph::graph::DepGraph::with_task_impl
36: rustc_data_structures::stack::ensure_sufficient_stack
37: rustc_query_system::query::plumbing::get_query_impl
38: rustc_typeck::check::check::check_item_type
39: rustc_middle::hir::map::Map::visit_item_likes_in_module
40: rustc_typeck::check::check::check_mod_item_types
41: rustc_middle::ty::query:: for rustc_middle::ty::query::queries::check_mod_item_types>::compute
42: rustc_middle::dep_graph::::with_deps
43: rustc_query_system::dep_graph::graph::DepGraph::with_task_impl
44: rustc_data_structures::stack::ensure_sufficient_stack
45: rustc_query_system::query::plumbing::get_query_impl
46: rustc_query_system::query::plumbing::ensure_query_impl
47: rustc_session::utils::::time
48: rustc_typeck::check_crate
49: rustc_interface::passes::analysis
50: rustc_middle::ty::query:: for rustc_middle::ty::query::queries::analysis>::compute
51: rustc_middle::dep_graph::::with_deps
52: rustc_query_system::dep_graph::graph::DepGraph::with_task_impl
53: rustc_middle::ty::query::plumbing::::start_query::{{closure}}::{{closure}}::{{closure}}
54: rustc_query_system::query::plumbing::get_query_impl
55: rustc_interface::passes::QueryContext::enter
56: rustc_interface::queries::::enter
57: rustc_span::with_source_map
58: rustc_interface::interface::create_compiler_and_run
59: scoped_tls::ScopedKey::set
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
```