Skip to content

Instantly share code, notes, and snippets.

@DoumanAsh
Created June 9, 2019 08:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DoumanAsh/2ce9e8aa6c360f5d74bdd169188fec8d to your computer and use it in GitHub Desktop.
Save DoumanAsh/2ce9e8aa6c360f5d74bdd169188fec8d to your computer and use it in GitHub Desktop.
error: internal compiler error: src\librustc_mir\transform\generator.rs:532: Broken MIR: generator contains type std::option::Option<http::header::HeaderValue> in MIR, but typeck only knows about for<'r> {&'r client::Client<C>, client::request::Request, usize, http::Method, http::Uri, http::HeaderMap, std::option::Option<bytes::Bytes>, hyper::client::ResponseFuture, futures_util::future::map::Map<futures_util::compat::compat01as03::Compat01As03<hyper::client::ResponseFuture>, [closure@src\client\mod.rs:233:80: 233:131]>, fn(std::result::Result<client::response::Response, hyper::Error>) -> std::result::Result<<std::result::Result<client::response::Response, hyper::Error> as std::ops::Try>::Ok, <std::result::Result<client::response::Response, hyper::Error> as std::ops::Try>::Error> {<std::result::Result<client::response::Response, hyper::Error> as std::ops::Try>::into_result}, ()}
--> src\client\mod.rs:217:86
|
217 | pub async fn redirect_request(&self, mut req: request::Request) -> RequestResult {
| ______________________________________________________________________________________^
218 | | use http::{Method, StatusCode};
219 | |
220 | | Self::apply_headers(&mut req);
... |
316 | | }
317 | | }
| |_____^
thread 'rustc' panicked at 'Box<Any>', src\librustc_errors\lib.rs:573:9
stack backtrace:
0: std::sys_common::alloc::realloc_fallback
1: std::panicking::take_hook
2: std::panicking::take_hook
3: <syntax::attr::builtin::IntType as rustc::ty::util::IntTypeExt>::disr_incr
4: std::panicking::rust_panic_with_hook
5: <rustc_mir::borrow_check::nll::region_infer::values::RegionElement as core::fmt::Debug>::fmt
6: <rustc_mir::util::elaborate_drops::Unwind as core::fmt::Debug>::fmt
7: <rustc_mir::hair::pattern::PatternRange as core::fmt::Debug>::fmt
8: <rustc_mir::hair::pattern::PatternRange as core::fmt::Debug>::fmt
9: <rustc_mir::hair::pattern::PatternRange as core::fmt::Debug>::fmt
10: <rustc_mir::hair::pattern::PatternRange as core::fmt::Debug>::fmt
11: <rustc_mir::hair::pattern::PatternRange as core::fmt::Debug>::fmt
12: <rustc_mir::hair::pattern::PatternRange as core::fmt::Debug>::fmt
13: <rustc_mir::transform::generator::StateTransform as rustc_mir::transform::MirPass>::run_pass
14: rustc_mir::transform::run_passes
15: rustc_mir::transform::run_passes
16: rustc_mir::transform::run_passes
17: rustc::middle::weak_lang_items::<impl rustc::ty::context::TyCtxt>::is_weak_lang_item
18: rustc::dep_graph::graph::DepGraph::assert_ignored
19: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::try_print_query_stack
20: rustc::ty::layout::provide
21: <rustc::ty::layout::LayoutError as core::fmt::Display>::fmt
22: rustc::ty::print::pretty::<impl core::fmt::Display for rustc::ty::subst::Kind>::fmt
23: rustc::middle::weak_lang_items::<impl rustc::ty::context::TyCtxt>::is_weak_lang_item
24: rustc::dep_graph::graph::DepGraph::assert_ignored
25: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::try_print_query_stack
26: <rustc::ty::layout::LayoutCx<rustc::ty::context::TyCtxt> as rustc_target::abi::LayoutOf>::layout_of
27: rustc::ty::structural_impls::<impl rustc::ty::context::Lift for rustc_target::abi::VariantIdx>::lift_to_tcx
28: rustc::hir::intravisit::NestedVisitorMap::inter
29: rustc::ty::structural_impls::<impl rustc::ty::context::Lift for rustc::ty::instance::Instance>::lift_to_tcx
30: rustc::hir::intravisit::NestedVisitorMap::inter
31: rustc::ty::layout::provide
32: <rustc::ty::layout::LayoutError as core::fmt::Display>::fmt
33: rustc::ty::print::pretty::<impl core::fmt::Display for rustc::ty::subst::Kind>::fmt
34: rustc::middle::weak_lang_items::<impl rustc::ty::context::TyCtxt>::is_weak_lang_item
35: rustc::dep_graph::graph::DepGraph::assert_ignored
36: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::try_print_query_stack
37: <rustc::ty::layout::LayoutCx<rustc::ty::context::TyCtxt> as rustc_target::abi::LayoutOf>::layout_of
38: rustc::hir::intravisit::NestedVisitorMap::inter
39: rustc::ty::layout::provide
40: <rustc::ty::layout::LayoutError as core::fmt::Display>::fmt
41: rustc::ty::print::pretty::<impl core::fmt::Display for rustc::ty::subst::Kind>::fmt
42: rustc::middle::weak_lang_items::<impl rustc::ty::context::TyCtxt>::is_weak_lang_item
43: rustc::dep_graph::graph::DepGraph::assert_ignored
44: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::try_print_query_stack
45: <rustc::ty::layout::LayoutCx<rustc::ty::context::TyCtxt> as rustc_target::abi::LayoutOf>::layout_of
46: rustc::ty::structural_impls::<impl rustc::ty::context::Lift for rustc_target::abi::VariantIdx>::lift_to_tcx
47: rustc::hir::intravisit::NestedVisitorMap::inter
48: rustc::ty::structural_impls::<impl rustc::ty::context::Lift for rustc::ty::instance::Instance>::lift_to_tcx
49: rustc::hir::intravisit::NestedVisitorMap::inter
50: rustc::ty::layout::provide
51: <rustc::ty::layout::LayoutError as core::fmt::Display>::fmt
52: rustc::ty::print::pretty::<impl core::fmt::Display for rustc::ty::subst::Kind>::fmt
53: rustc::middle::weak_lang_items::<impl rustc::ty::context::TyCtxt>::is_weak_lang_item
54: rustc::dep_graph::graph::DepGraph::assert_ignored
55: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::try_print_query_stack
56: <rustc::ty::layout::LayoutCx<rustc::ty::context::TyCtxt> as rustc_target::abi::LayoutOf>::layout_of
57: rustc::ty::structural_impls::<impl rustc::ty::context::Lift for rustc_target::abi::VariantIdx>::lift_to_tcx
58: rustc::hir::intravisit::NestedVisitorMap::inter
59: rustc::ty::structural_impls::<impl rustc::ty::context::Lift for rustc::ty::instance::Instance>::lift_to_tcx
60: rustc::hir::intravisit::NestedVisitorMap::inter
61: rustc::ty::layout::provide
62: <rustc::ty::layout::LayoutError as core::fmt::Display>::fmt
63: rustc::ty::print::pretty::<impl core::fmt::Display for rustc::ty::subst::Kind>::fmt
64: rustc::middle::weak_lang_items::<impl rustc::ty::context::TyCtxt>::is_weak_lang_item
65: rustc::dep_graph::graph::DepGraph::assert_ignored
66: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::try_print_query_stack
67: <rustc::ty::layout::LayoutCx<rustc::ty::context::TyCtxt> as rustc_target::abi::LayoutOf>::layout_of
68: rustc::ty::structural_impls::<impl rustc::ty::context::Lift for rustc_target::abi::VariantIdx>::lift_to_tcx
69: rustc::hir::intravisit::NestedVisitorMap::inter
70: rustc::ty::structural_impls::<impl rustc::ty::context::Lift for rustc::ty::instance::Instance>::lift_to_tcx
71: rustc::hir::intravisit::NestedVisitorMap::inter
72: rustc::ty::layout::provide
73: <rustc::ty::layout::LayoutError as core::fmt::Display>::fmt
74: rustc::ty::print::pretty::<impl core::fmt::Display for rustc::ty::subst::Kind>::fmt
75: rustc::middle::weak_lang_items::<impl rustc::ty::context::TyCtxt>::is_weak_lang_item
76: rustc::dep_graph::graph::DepGraph::assert_ignored
77: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::try_print_query_stack
78: <rustc::ty::layout::LayoutCx<rustc::ty::context::TyCtxt> as rustc_target::abi::LayoutOf>::layout_of
79: rustc::ty::structural_impls::<impl rustc::ty::context::Lift for rustc_target::abi::VariantIdx>::lift_to_tcx
80: rustc::hir::intravisit::NestedVisitorMap::inter
81: rustc::ty::structural_impls::<impl rustc::ty::context::Lift for rustc::ty::instance::Instance>::lift_to_tcx
82: rustc::hir::intravisit::NestedVisitorMap::inter
83: rustc::ty::layout::provide
84: <rustc::ty::layout::LayoutError as core::fmt::Display>::fmt
85: rustc::ty::print::pretty::<impl core::fmt::Display for rustc::ty::subst::Kind>::fmt
86: rustc::middle::weak_lang_items::<impl rustc::ty::context::TyCtxt>::is_weak_lang_item
87: rustc::dep_graph::graph::DepGraph::assert_ignored
88: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::try_print_query_stack
89: <rustc::ty::layout::LayoutCx<rustc::ty::context::TyCtxt> as rustc_target::abi::LayoutOf>::layout_of
90: <rustc_mir::transform::const_prop::ConstPropagator as rustc::mir::visit::MutVisitor>::visit_statement
91: <rustc_mir::transform::const_prop::ConstProp as rustc_mir::transform::MirPass>::run_pass
92: rustc_mir::transform::run_passes
93: rustc_mir::transform::run_passes
94: rustc_mir::transform::run_passes
95: rustc::middle::weak_lang_items::<impl rustc::ty::context::TyCtxt>::is_weak_lang_item
96: rustc::dep_graph::graph::DepGraph::assert_ignored
97: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::try_print_query_stack
98: rustc::ty::layout::provide
99: <rustc::ty::layout::LayoutError as core::fmt::Display>::fmt
100: rustc::ty::print::pretty::<impl core::fmt::Display for rustc::ty::subst::Kind>::fmt
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
query stack during panic:
#0 [optimized_mir] processing `client::Client::<C>::redirect_request::{{closure}}#0`
#1 [layout_raw] computing layout of `[static generator@src\client\mod.rs:217:86: 317:6 self:&client::Client<C>, __arg1:client::request::Request for<'r> {&'r client::Client<C>, client::request::Request, usize, http::Method, http::Uri, http::HeaderMap, std::option::Option<bytes::Bytes>, hyper::client::ResponseFuture, futures_util::future::map::Map<futures_util::compat::compat01as03::Compat01As03<hyper::client::ResponseFuture>, [closure@src\client\mod.rs:233:80: 233:131]>, fn(std::result::Result<client::response::Response, hyper::Error>) -> std::result::Result<<std::result::Result<client::response::Response, hyper::Error> as std::ops::Try>::Ok, <std::result::Result<client::response::Response, hyper::Error> as std::ops::Try>::Error> {<std::result::Result<client::response::Response, hyper::Error> as std::ops::Try>::into_result}, ()}]`
#2 [layout_raw] computing layout of `std::future::GenFuture<[static generator@src\client\mod.rs:217:86: 317:6 self:&client::Client<C>, __arg1:client::request::Request for<'r> {&'r client::Client<C>, client::request::Request, usize, http::Method, http::Uri, http::HeaderMap, std::option::Option<bytes::Bytes>, hyper::client::ResponseFuture, futures_util::future::map::Map<futures_util::compat::compat01as03::Compat01As03<hyper::client::ResponseFuture>, [closure@src\client\mod.rs:233:80: 233:131]>, fn(std::result::Result<client::response::Response, hyper::Error>) -> std::result::Result<<std::result::Result<client::response::Response, hyper::Error> as std::ops::Try>::Ok, <std::result::Result<client::response::Response, hyper::Error> as std::ops::Try>::Error> {<std::result::Result<client::response::Response, hyper::Error> as std::ops::Try>::into_result}, ()}]>`
#3 [layout_raw] computing layout of `(std::future::GenFuture<[static generator@src\client\mod.rs:217:86: 317:6 self:&client::Client<C>, __arg1:client::request::Request for<'r> {&'r client::Client<C>, client::request::Request, usize, http::Method, http::Uri, http::HeaderMap, std::option::Option<bytes::Bytes>, hyper::client::ResponseFuture, futures_util::future::map::Map<futures_util::compat::compat01as03::Compat01As03<hyper::client::ResponseFuture>, [closure@src\client\mod.rs:233:80: 233:131]>, fn(std::result::Result<client::response::Response, hyper::Error>) -> std::result::Result<<std::result::Result<client::response::Response, hyper::Error> as std::ops::Try>::Ok, <std::result::Result<client::response::Response, hyper::Error> as std::ops::Try>::Error> {<std::result::Result<client::response::Response, hyper::Error> as std::ops::Try>::into_result}, ()}]>, <C as client::config::Config>::Timer)`
#4 [layout_raw] computing layout of `std::option::Option<(std::future::GenFuture<[static generator@src\client\mod.rs:217:86: 317:6 self:&client::Client<C>, __arg1:client::request::Request for<'r> {&'r client::Client<C>, client::request::Request, usize, http::Method, http::Uri, http::HeaderMap, std::option::Option<bytes::Bytes>, hyper::client::ResponseFuture, futures_util::future::map::Map<futures_util::compat::compat01as03::Compat01As03<hyper::client::ResponseFuture>, [closure@src\client\mod.rs:233:80: 233:131]>, fn(std::result::Result<client::response::Response, hyper::Error>) -> std::result::Result<<std::result::Result<client::response::Response, hyper::Error> as std::ops::Try>::Ok, <std::result::Result<client::response::Response, hyper::Error> as std::ops::Try>::Error> {<std::result::Result<client::response::Response, hyper::Error> as std::ops::Try>::into_result}, ()}]>, <C as client::config::Config>::Timer)>`
#5 [layout_raw] computing layout of `async_timer::timed::Expired<std::future::GenFuture<[static generator@src\client\mod.rs:217:86: 317:6 self:&client::Client<C>, __arg1:client::request::Request for<'r> {&'r client::Client<C>, client::request::Request, usize, http::Method, http::Uri, http::HeaderMap, std::option::Option<bytes::Bytes>, hyper::client::ResponseFuture, futures_util::future::map::Map<futures_util::compat::compat01as03::Compat01As03<hyper::client::ResponseFuture>, [closure@src\client\mod.rs:233:80: 233:131]>, fn(std::result::Result<client::response::Response, hyper::Error>) -> std::result::Result<<std::result::Result<client::response::Response, hyper::Error> as std::ops::Try>::Ok, <std::result::Result<client::response::Response, hyper::Error> as std::ops::Try>::Error> {<std::result::Result<client::response::Response, hyper::Error> as std::ops::Try>::into_result}, ()}]>, <C as client::config::Config>::Timer>`
#6 [layout_raw] computing layout of `std::result::Result<std::result::Result<client::response::Response, hyper::Error>, async_timer::timed::Expired<std::future::GenFuture<[static generator@src\client\mod.rs:217:86: 317:6 self:&client::Client<C>, __arg1:client::request::Request for<'r> {&'r client::Client<C>, client::request::Request, usize, http::Method, http::Uri, http::HeaderMap, std::option::Option<bytes::Bytes>, hyper::client::ResponseFuture, futures_util::future::map::Map<futures_util::compat::compat01as03::Compat01As03<hyper::client::ResponseFuture>, [closure@src\client\mod.rs:233:80: 233:131]>, fn(std::result::Result<client::response::Response, hyper::Error>) -> std::result::Result<<std::result::Result<client::response::Response, hyper::Error> as std::ops::Try>::Ok, <std::result::Result<client::response::Response, hyper::Error> as std::ops::Try>::Error> {<std::result::Result<client::response::Response, hyper::Error> as std::ops::Try>::into_result}, ()}]>, <C as client::config::Config>::Timer>>`
#7 [layout_raw] computing layout of `std::ops::GeneratorState<(), std::result::Result<std::result::Result<client::response::Response, hyper::Error>, async_timer::timed::Expired<std::future::GenFuture<[static generator@src\client\mod.rs:217:86: 317:6 self:&client::Client<C>, __arg1:client::request::Request for<'r> {&'r client::Client<C>, client::request::Request, usize, http::Method, http::Uri, http::HeaderMap, std::option::Option<bytes::Bytes>, hyper::client::ResponseFuture, futures_util::future::map::Map<futures_util::compat::compat01as03::Compat01As03<hyper::client::ResponseFuture>, [closure@src\client\mod.rs:233:80: 233:131]>, fn(std::result::Result<client::response::Response, hyper::Error>) -> std::result::Result<<std::result::Result<client::response::Response, hyper::Error> as std::ops::Try>::Ok, <std::result::Result<client::response::Response, hyper::Error> as std::ops::Try>::Error> {<std::result::Result<client::response::Response, hyper::Error> as std::ops::Try>::into_result}, ()}]>, <C as client::config::Config>::Timer>>>`
#8 [optimized_mir] processing `client::Client::<C>::send_redirect::{{closure}}#0`
#9 [layout_raw] computing layout of `[static generator@src\client\mod.rs:199:179: 214:6 self:&client::Client<C>, req:client::request::Request for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5> {&'r client::Client<C>, client::request::Request, std::time::Duration, &'s std::time::Duration, u64, &'t0 u64, &'t1 u64, bool, fn(std::result::Result<client::response::Response, hyper::Error>) -> std::result::Result<std::result::Result<client::response::Response, hyper::Error>, async_timer::timed::Expired<impl std::future::Future, <C as client::config::Config>::Timer>> {std::result::Result::<std::result::Result<client::response::Response, hyper::Error>, async_timer::timed::Expired<impl std::future::Future, <C as client::config::Config>::Timer>>::Ok}, impl std::future::Future, (), impl std::future::Future, async_timer::Timed<impl std::future::Future, <C as client::config::Config>::Timer>}]`
#10 [optimized_mir] processing `client::Client::<C>::send_redirect`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment