Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Panic when compiling serde_with #1567

Open
jrobsonchase opened this issue Oct 15, 2019 · 4 comments
Open

Panic when compiling serde_with #1567

jrobsonchase opened this issue Oct 15, 2019 · 4 comments

Comments

@jrobsonchase
Copy link
Contributor

Versions:

$ rustc --version;cargo --version;rls --version
rustc 1.39.0-beta.5 (fa5c2f3e5 2019-10-02)
cargo 1.39.0-beta (1c6ec66d5 2019-09-30)
rls 1.39.0 (80a1d34 2019-09-20)

$ cargo tree | grep serde_with
├── serde_with v1.3.1

Error from rls log (with backtrace):

{"message":"src/librustc/ty/context.rs:211: node type <S>::Err (hir_id=HirId { owner: DefIndex(326), local_id: 7 }) with HirId::owner DefId(0:326 ~ serde_with[8b15]::rust[0]::string_empty_as_none[0]::deserialize[0]::{{impl}}[0]) cannot be placed in TypeckTables with local_id_root DefId(0:318 ~ serde_with[8b15]::rust[0]::string_empty_as_none[0]::deserialize[0])","code":null,"level":"error: internal compiler error","spans":[],"children":[],"rendered":"error: internal compiler error: src/librustc/ty/context.rs:211: node type <S>::Err (hir_id=HirId { owner: DefIndex(326), local_id: 7 }) with HirId::owner DefId(0:326 ~ serde_with[8b15]::rust[0]::string_empty_as_none[0]::deserialize[0]::{{impl}}[0]) cannot be placed in TypeckTables with local_id_root DefId(0:318 ~ serde_with[8b15]::rust[0]::string_empty_as_none[0]::deserialize[0])\n\n"}
thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:812:9
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.37/src/backtrace/libunwind.rs:88
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.37/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print_fmt
             at src/libstd/sys_common/backtrace.rs:76
   3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
             at src/libstd/sys_common/backtrace.rs:60
   4: core::fmt::write
             at src/libcore/fmt/mod.rs:1030
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1412
   6: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:64
   7: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:49
   8: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:196
   9: std::panicking::default_hook
             at src/libstd/panicking.rs:210
  10: rustc_driver::report_ice
  11: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:477
  12: std::panicking::begin_panic
  13: rustc_errors::HandlerInner::bug
  14: rustc_errors::Handler::bug
  15: rustc::util::bug::opt_span_bug_fmt::{{closure}}
  16: rustc::ty::context::tls::with_opt::{{closure}}
  17: rustc::ty::context::tls::with_context_opt
  18: rustc::ty::context::tls::with_opt
  19: rustc::util::bug::opt_span_bug_fmt
  20: rustc::util::bug::bug_fmt
  21: rustc::ty::context::validate_hir_id_for_typeck_tables::{{closure}}
  22: rustc::ty::context::tls::with::{{closure}}
  23: rustc::ty::context::tls::with_context::{{closure}}
  24: rustc::ty::context::tls::with_context_opt
  25: rustc::ty::context::tls::with_context
  26: rustc::ty::context::tls::with
  27: rustc::ty::context::TypeckTables::qpath_res
  28: rustc_save_analysis::SaveContext::get_path_res
  29: <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_ty
  30: <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_generics
  31: rustc_save_analysis::dump_visitor::DumpVisitor::process_generic_params
  32: <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_item
  33: rustc_save_analysis::dump_visitor::DumpVisitor::process_fn::{{closure}}
  34: <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_item
  35: <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_item
  36: <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_item
  37: <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_mod
  38: rustc::dep_graph::graph::DepGraph::with_ignore
  39: rustc_driver::run_compiler::{{closure}}::{{closure}}::{{closure}}
  40: rustc::util::common::time
  41: rustc_interface::passes::BoxedGlobalCtxt::access::{{closure}}
  42: rustc_interface::passes::create_global_ctxt::{{closure}}
  43: rustc_interface::interface::run_compiler_in_existing_thread_pool
  44: std::thread::local::LocalKey<T>::with
  45: scoped_tls::ScopedKey<T>::set
  46: syntax::with_globals
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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.39.0-beta.5 (fa5c2f3e5 2019-10-02) running on x86_64-unknown-linux-gnu

note: compiler flags: -C debuginfo=2 --crate-type lib

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
end of query stack
{"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
@norru
Copy link

norru commented Oct 15, 2019

Same as #1558, #1560

rust-lang/rust#65353

@Xanewok
Copy link
Member

Xanewok commented Oct 17, 2019

@jrobsonchase can you download the latest nightly and see if the issue persists?

@Xanewok
Copy link
Member

Xanewok commented Oct 18, 2019

I just checked and it seems that the compilation is only fixed with rust-lang/rust#65511 applied, so we'll have to wait for that

@norru
Copy link

norru commented Oct 23, 2019

I think this is fixed in nightly-2019-10-20

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants