Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustc panicked at invalid lint-id trivial_numeric_casts #43331

Closed
fullmetaldr opened this issue Jul 19, 2017 · 3 comments
Closed

rustc panicked at invalid lint-id trivial_numeric_casts #43331

fullmetaldr opened this issue Jul 19, 2017 · 3 comments

Comments

@fullmetaldr
Copy link

While building my project using cargo (simple cargo build, no build script), the compiler panicked. The error message indicates the rustc thread panicked and that this was a bug.

The error itself happened after I updated some dependency versions for Serde libraries.
I changed the following in my Cargo.toml file:
serde_cbor = "0.5.0" => serde_cbor = "0.6.0"
serde_derive = "0.9" => serde_derive = "1.0.10"
serde = "0.9" => serde = "1.0.10"

I expected my project to build normally afterwards by issuing cargo build.

Instead, this error message happened:
error: internal compiler error: unexpected panic

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

thread 'rustc' panicked at 'invalid lint-id trivial_numeric_casts', /checkout/src/librustc/lint/context.rs:1322

note: run with RUST_BACKTRACE=1 for a backtrace

Meta

rustc --version --verbose:
rustc 1.18.0 (03fc9d6 2017-06-06)
binary: rustc
commit-hash: 03fc9d6
commit-date: 2017-06-06
host: x86_64-unknown-linux-gnu
release: 1.18.0
LLVM version: 3.9

Backtrace:
thread 'rustc' panicked at 'invalid lint-id trivial_numeric_casts', /checkout/src/librustc/lint/context.rs:1322
stack backtrace:
0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
1: std::sys_common::backtrace::_print
at /checkout/src/libstd/sys_common/backtrace.rs:71
2: std::panicking::default_hook::{{closure}}
at /checkout/src/libstd/sys_common/backtrace.rs:60
at /checkout/src/libstd/panicking.rs:355
3: std::panicking::default_hook
at /checkout/src/libstd/panicking.rs:365
4: std::panicking::rust_panic_with_hook
at /checkout/src/libstd/panicking.rs:549
5: std::panicking::begin_panic
at /checkout/src/libstd/panicking.rs:511
6: std::panicking::begin_panic_fmt
at /checkout/src/libstd/panicking.rs:495
7: <rustc::ty::context::TypeckTables<'tcx> as serialize::serialize::Decodable>::decode::{{closure}}
8: rustc_metadata::decoder::<impl rustc_metadata::cstore::CrateMetadata>::item_body_tables
9: rustc_metadata::cstore_impl::provide::typeck_tables
10: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables<'tcx>>::try_get
11: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables<'tcx>>::get
12: rustc::ty::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::item_tables
13: rustc_const_eval::eval::const_eval
14: rustc::ty::maps::<impl rustc::ty::maps::queries::const_eval<'tcx>>::try_get
15: rustc::ty::maps::<impl rustc::ty::maps::queries::const_eval<'tcx>>::get
16: rustc::ty::layout::Layout::compute_uncached
17: rustc::ty::util::<impl rustc::ty::TyS<'tcx>>::layout
18: <collections::vec::Vec<T> as collections::vec::SpecExtend<T, I>>::from_iter
19: <core::result::Result<V, E> as core::iter::traits::FromIterator<core::result::Result<A, E>>>::from_iter
20: rustc::ty::layout::Layout::compute_uncached::{{closure}}
21: <core::option::Option<T>>::map
22: <<core::result::Result<V, E> as core::iter::traits::FromIterator<core::result::Result<A, E>>>::from_iter::Adapter<Iter, E> as core::iter::iterator::Iterator>::next
23: <collections::vec::Vec<T>>::extend_desugared
24: <collections::vec::Vec<T> as collections::vec::SpecExtend<T, I>>::from_iter
25: <core::result::Result<V, E> as core::iter::traits::FromIterator<core::result::Result<A, E>>>::from_iter
26: rustc::ty::layout::Layout::compute_uncached
27: <rustc_lint::types::VariantSizeDifferences as rustc::lint::LateLintPass<'a, 'tcx>>::check_item
28: rustc::lint::context::LintContext::with_lint_attrs
29: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_mod
30: rustc::hir::intravisit::walk_item
31: rustc::lint::context::LintContext::with_lint_attrs
32: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_mod
33: rustc::lint::context::check_crate
34: rustc_driver::driver::phase_3_run_analysis_passes::{{closure}}
35: rustc::ty::context::TyCtxt::create_and_enter
36: rustc_driver::driver::phase_3_run_analysis_passes
37: rustc_driver::driver::compile_input
38: rustc_driver::run_compiler
39: std::panicking::try::do_call
40: __rust_maybe_catch_panic
at /checkout/src/libpanic_unwind/lib.rs:98
41: <F as alloc::boxed::FnBox<A>>::call_box
42: std::sys::imp::thread::Thread::new::thread_start
at /checkout/src/liballoc/boxed.rs:650
at /checkout/src/libstd/sys_common/thread.rs:21
at /checkout/src/libstd/sys/unix/thread.rs:84
43: start_thread
44: clone

@kennytm
Copy link
Member

kennytm commented Jul 19, 2017

Duplicate of #42007, please upgrade to 1.19 (to be released by the end of this week).

@kennytm kennytm marked this as a duplicate of #42007 Jul 19, 2017
@Mark-Simulacrum
Copy link
Member

(Closing as a duplicate).

@fullmetaldr
Copy link
Author

Thanks, @kennytm. I'll wait for the version update then.

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

No branches or pull requests

3 participants