Closed
Description
Repro:
fn main() {
please.crash::<u8>();
}
This crashes on 1.22+ (no repro on 1.21 or below):
error[E0425]: cannot find value `please` in this scope
--> 1.rs:2:5
|
2 | please.crash::<u8>();
| ^^^^^^ not found in this scope
error: internal compiler error: src/librustc_typeck/check/mod.rs:2015: no type for node 7: type u8 (id=7) in fcx 0x70000b83c4a8
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: rustc 1.22.0-nightly (26015da01 2017-09-23) running on x86_64-apple-darwin
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:492:8
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
1: std::sys_common::backtrace::_print
2: std::panicking::default_hook::{{closure}}
3: std::panicking::default_hook
4: std::panicking::rust_panic_with_hook
5: std::panicking::begin_panic
6: rustc_errors::Handler::bug
7: rustc::session::opt_span_bug_fmt::{{closure}}
8: rustc::session::opt_span_bug_fmt
9: rustc::session::bug_fmt
10: rustc_typeck::check::FnCtxt::node_ty
11: <rustc_typeck::check::writeback::WritebackCx<'cx, 'gcx, 'tcx> as rustc::hir::intravisit::Visitor<'gcx>>::visit_ty
12: rustc::hir::intravisit::walk_path_parameters
13: <rustc_typeck::check::writeback::WritebackCx<'cx, 'gcx, 'tcx> as rustc::hir::intravisit::Visitor<'gcx>>::visit_expr
14: <rustc_typeck::check::writeback::WritebackCx<'cx, 'gcx, 'tcx> as rustc::hir::intravisit::Visitor<'gcx>>::visit_block
15: <rustc_typeck::check::writeback::WritebackCx<'cx, 'gcx, 'tcx> as rustc::hir::intravisit::Visitor<'gcx>>::visit_expr
16: rustc_typeck::check::typeck_tables_of::{{closure}}
17: rustc_typeck::check::typeck_tables_of
18: rustc::dep_graph::graph::DepGraph::with_task
19: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::try_get
20: rustc::ty::maps::TyCtxtAt::typeck_tables_of
21: rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::typeck_tables_of
22: rustc_typeck::check::typeck_item_bodies
23: rustc::dep_graph::graph::DepGraph::with_task
24: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_item_bodies<'tcx>>::try_get
25: rustc::ty::maps::TyCtxtAt::typeck_item_bodies
26: rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::typeck_item_bodies
27: rustc_typeck::check_crate
28: rustc::ty::context::TyCtxt::create_and_enter
29: rustc_driver::driver::compile_input
30: rustc_driver::run_compiler