Closed

Description
EDIT3: ignore everything(to save time) and skip directly to this comment for this ICE reproduction steps.
EDIT2: this is probably already fixed nope! To reproduce the ICE currently, you have to do this because rust-clippy worked around it.
EDIT: ICE only happens when rustc
has been compiled with debug-assertions = true
After successfully compiling rust-clippy
HEAD with this rustc
HEAD, running rust-clippy
on itself causes an ICE like so:
/home/xftroxgpx/build/2nonpkgs/rust.stuff/rust-clippy
$ RUST_BACKTRACE=1 ./target/debug/cargo-clippy
!! LD_LIBRARY_PATH=/home/xftroxgpx/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib:/home/xftroxgpx/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib:/home/xftroxgpx/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib:/home/xftroxgpx/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib:/home/xftroxgpx/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib:/home/xftroxgpx/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib:
!! Executing '/home/xftroxgpx/build/2nonpkgs/rust.stuff/cargo/cargo//target/release//cargo' in pwd='/home/xftroxgpx/build/2nonpkgs/rust.stuff/rust-clippy' with args: 'check'
Checking unicode-normalization v0.1.7
Checking itertools v0.7.8
Checking regex-syntax v0.6.2
Checking serde v1.0.80
error: internal compiler error: src/librustc/ty/context.rs:248: node type Result<T, Option<T>> (id=19954) with HirId::owner DefId(0/0:744 ~ itertools[656b]::Itertools[0]::tree_fold1[0]::State[0]) cannot be placed in TypeckTables with local_id_root DefId(0/0:743 ~ itertools[656b]::Itertools[0]::tree_fold1[0])
thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:590:9
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
1: std::sys_common::backtrace::print
2: std::panicking::default_hook::{{closure}}
3: std::panicking::default_hook
4: rustc::util::common::panic_hook
5: std::panicking::rust_panic_with_hook
6: std::panicking::begin_panic
7: rustc_errors::Handler::bug
8: rustc::util::bug::opt_span_bug_fmt::{{closure}}
9: rustc::ty::context::tls::with_opt::{{closure}}
10: rustc::ty::context::tls::with_context_opt
11: rustc::ty::context::tls::with_opt
12: rustc::util::bug::opt_span_bug_fmt
13: rustc::util::bug::bug_fmt
14: rustc::ty::context::validate_hir_id_for_typeck_tables::{{closure}}
15: rustc::ty::context::tls::with::{{closure}}
16: rustc::ty::context::tls::with_context::{{closure}}
17: rustc::ty::context::tls::with_context_opt
18: rustc::ty::context::tls::with_context
19: rustc::ty::context::tls::with
20: rustc::ty::context::TypeckTables::node_id_to_type_opt
21: <clippy_lints::random_state::Pass as rustc::lint::LateLintPass<'a, 'tcx>>::check_ty
at /home/xftroxgpx/build/2nonpkgs/rust.stuff/rust-clippy/clippy_lints/src/random_state.rs:38
22: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_ty
23: rustc::hir::intravisit::walk_item
24: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::lint::context::LintContext<'tcx>>::with_lint_attrs
25: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_item
26: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_decl
27: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_stmt
28: rustc::hir::intravisit::walk_block
29: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_block
30: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::lint::context::LintContext<'tcx>>::with_lint_attrs
31: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_expr
32: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_body
33: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_nested_body
34: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_fn
35: rustc::hir::intravisit::walk_trait_item
36: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::lint::context::LintContext<'tcx>>::with_lint_attrs
37: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_trait_item
38: rustc::hir::intravisit::walk_trait_item_ref
39: rustc::hir::intravisit::walk_item
40: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::lint::context::LintContext<'tcx>>::with_lint_attrs
41: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_item
42: rustc::hir::intravisit::walk_mod
43: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_mod
44: rustc::hir::intravisit::walk_crate
45: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::lint::context::LintContext<'tcx>>::with_lint_attrs
46: rustc::lint::context::check_crate
47: rustc::util::common::time
48: <std::thread::local::LocalKey<T>>::with
49: rustc::ty::context::tls::enter_global
50: rustc::ty::context::TyCtxt::create_and_enter
51: rustc_driver::driver::phase_3_run_analysis_passes
52: rustc_driver::driver::compile_input
53: rustc_driver::run_compiler_with_pool
54: <scoped_tls::ScopedKey<T>>::set
55: rustc_driver::driver::spawn_thread_pool
56: rustc_driver::run_compiler
57: clippy_driver::main::{{closure}}
at /home/xftroxgpx/build/2nonpkgs/rust.stuff/rust-clippy/src/driver.rs:154
58: rustc_driver::run::{{closure}}::{{closure}}
at /home/xftroxgpx/build/2nonpkgs/rust.stuff/rust/rust/src/librustc_driver/lib.rs:170
59: <scoped_tls::ScopedKey<T>>::set
at /home/xftroxgpx/.cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:155
60: syntax::with_globals::{{closure}}
at /home/xftroxgpx/build/2nonpkgs/rust.stuff/rust/rust/src/libsyntax/lib.rs:113
61: <scoped_tls::ScopedKey<T>>::set
at /home/xftroxgpx/.cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:155
62: syntax::with_globals
at /home/xftroxgpx/build/2nonpkgs/rust.stuff/rust/rust/src/libsyntax/lib.rs:112
63: rustc_driver::run::{{closure}}
at /home/xftroxgpx/build/2nonpkgs/rust.stuff/rust/rust/src/librustc_driver/lib.rs:169
64: rustc_driver::monitor::{{closure}}
at /home/xftroxgpx/build/2nonpkgs/rust.stuff/rust/rust/src/librustc_driver/lib.rs:1566
query stack during panic:
end of query stack
error: aborting due to previous error
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.33.0-dev (ec194646f 2019-01-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
error: Could not compile `itertools`.
warning: build failed, waiting for other jobs to finish...
error: internal compiler error: src/librustc/ty/context.rs:248: node type &'static [(char, char)] (id=26257) with HirId::owner DefId(0/0:621 ~ regex_syntax[bb8f]::hir[0]::translate[0]::ascii_class[0]::T[0]) cannot be placed in TypeckTables with local_id_root DefId(0/0:619 ~ regex_syntax[bb8f]::hir[0]::translate[0]::ascii_class[0])
thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:590:9
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
1: std::sys_common::backtrace::print
2: std::panicking::default_hook::{{closure}}
3: std::panicking::default_hook
4: rustc::util::common::panic_hook
5: std::panicking::rust_panic_with_hook
6: std::panicking::begin_panic
7: rustc_errors::Handler::bug
8: rustc::util::bug::opt_span_bug_fmt::{{closure}}
9: rustc::ty::context::tls::with_opt::{{closure}}
10: rustc::ty::context::tls::with_context_opt
11: rustc::ty::context::tls::with_opt
12: rustc::util::bug::opt_span_bug_fmt
13: rustc::util::bug::bug_fmt
14: rustc::ty::context::validate_hir_id_for_typeck_tables::{{closure}}
15: rustc::ty::context::tls::with::{{closure}}
16: rustc::ty::context::tls::with_context::{{closure}}
17: rustc::ty::context::tls::with_context_opt
18: rustc::ty::context::tls::with_context
19: rustc::ty::context::tls::with
20: rustc::ty::context::TypeckTables::node_id_to_type_opt
21: <clippy_lints::random_state::Pass as rustc::lint::LateLintPass<'a, 'tcx>>::check_ty
at /home/xftroxgpx/build/2nonpkgs/rust.stuff/rust-clippy/clippy_lints/src/random_state.rs:38
22: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_ty
23: rustc::hir::intravisit::walk_item
24: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::lint::context::LintContext<'tcx>>::with_lint_attrs
25: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_item
26: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_decl
27: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_stmt
28: rustc::hir::intravisit::walk_block
29: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_block
30: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::lint::context::LintContext<'tcx>>::with_lint_attrs
31: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_expr
32: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_body
33: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_nested_body
34: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_fn
35: rustc::hir::intravisit::walk_item
36: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::lint::context::LintContext<'tcx>>::with_lint_attrs
37: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_item
38: rustc::hir::intravisit::walk_mod
39: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_mod
40: rustc::hir::intravisit::walk_item
41: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::lint::context::LintContext<'tcx>>::with_lint_attrs
42: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_item
43: rustc::hir::intravisit::walk_mod
44: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_mod
45: rustc::hir::intravisit::walk_item
46: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::lint::context::LintContext<'tcx>>::with_lint_attrs
47: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_item
48: rustc::hir::intravisit::walk_mod
49: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_mod
50: rustc::hir::intravisit::walk_crate
51: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::lint::context::LintContext<'tcx>>::with_lint_attrs
52: rustc::lint::context::check_crate
53: rustc::util::common::time
54: <std::thread::local::LocalKey<T>>::with
55: rustc::ty::context::tls::enter_global
56: rustc::ty::context::TyCtxt::create_and_enter
57: rustc_driver::driver::phase_3_run_analysis_passes
58: rustc_driver::driver::compile_input
59: rustc_driver::run_compiler_with_pool
60: <scoped_tls::ScopedKey<T>>::set
61: rustc_driver::driver::spawn_thread_pool
62: rustc_driver::run_compiler
63: clippy_driver::main::{{closure}}
at /home/xftroxgpx/build/2nonpkgs/rust.stuff/rust-clippy/src/driver.rs:154
64: rustc_driver::run::{{closure}}::{{closure}}
at /home/xftroxgpx/build/2nonpkgs/rust.stuff/rust/rust/src/librustc_driver/lib.rs:170
65: <scoped_tls::ScopedKey<T>>::set
at /home/xftroxgpx/.cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:155
66: syntax::with_globals::{{closure}}
at /home/xftroxgpx/build/2nonpkgs/rust.stuff/rust/rust/src/libsyntax/lib.rs:113
67: <scoped_tls::ScopedKey<T>>::set
at /home/xftroxgpx/.cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:155
68: syntax::with_globals
at /home/xftroxgpx/build/2nonpkgs/rust.stuff/rust/rust/src/libsyntax/lib.rs:112
69: rustc_driver::run::{{closure}}
at /home/xftroxgpx/build/2nonpkgs/rust.stuff/rust/rust/src/librustc_driver/lib.rs:169
70: rustc_driver::monitor::{{closure}}
at /home/xftroxgpx/build/2nonpkgs/rust.stuff/rust/rust/src/librustc_driver/lib.rs:1566
query stack during panic:
end of query stack
error: aborting due to previous error
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.33.0-dev (ec194646f 2019-01-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
error: Could not compile `regex-syntax`.
warning: build failed, waiting for other jobs to finish...
error: internal compiler error: src/librustc/ty/context.rs:248: node type PrimitiveVisitor (id=78333) with HirId::owner DefId(0/0:2831 ~ serde[2a2a]::de[0]::impls[0]::{{impl}}[39]::deserialize[0]::{{impl}}[0]) cannot be placed in TypeckTables with local_id_root DefId(0/0:2829 ~ serde[2a2a]::de[0]::impls[0]::{{impl}}[39]::deserialize[0])
thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:590:9
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
1: std::sys_common::backtrace::print
2: std::panicking::default_hook::{{closure}}
3: std::panicking::default_hook
4: rustc::util::common::panic_hook
5: std::panicking::rust_panic_with_hook
6: std::panicking::begin_panic
7: rustc_errors::Handler::bug
8: rustc::util::bug::opt_span_bug_fmt::{{closure}}
9: rustc::ty::context::tls::with_opt::{{closure}}
10: rustc::ty::context::tls::with_context_opt
11: rustc::ty::context::tls::with_opt
12: rustc::util::bug::opt_span_bug_fmt
13: rustc::util::bug::bug_fmt
14: rustc::ty::context::validate_hir_id_for_typeck_tables::{{closure}}
15: rustc::ty::context::tls::with::{{closure}}
16: rustc::ty::context::tls::with_context::{{closure}}
17: rustc::ty::context::tls::with_context_opt
18: rustc::ty::context::tls::with_context
19: rustc::ty::context::tls::with
20: rustc::ty::context::TypeckTables::node_id_to_type_opt
21: <clippy_lints::random_state::Pass as rustc::lint::LateLintPass<'a, 'tcx>>::check_ty
at /home/xftroxgpx/build/2nonpkgs/rust.stuff/rust-clippy/clippy_lints/src/random_state.rs:38
22: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_ty
23: rustc::hir::intravisit::walk_item
24: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::lint::context::LintContext<'tcx>>::with_lint_attrs
25: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_item
26: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_decl
27: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_stmt
28: rustc::hir::intravisit::walk_block
29: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_block
30: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::lint::context::LintContext<'tcx>>::with_lint_attrs
31: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_expr
32: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_body
33: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_nested_body
34: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_fn
35: rustc::hir::intravisit::walk_impl_item
36: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::lint::context::LintContext<'tcx>>::with_lint_attrs
37: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_impl_item
38: rustc::hir::intravisit::walk_impl_item_ref
39: rustc::hir::intravisit::walk_item
40: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::lint::context::LintContext<'tcx>>::with_lint_attrs
41: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_item
42: rustc::hir::intravisit::walk_mod
43: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_mod
44: rustc::hir::intravisit::walk_item
45: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::lint::context::LintContext<'tcx>>::with_lint_attrs
46: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_item
47: rustc::hir::intravisit::walk_mod
48: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_mod
49: rustc::hir::intravisit::walk_item
50: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::lint::context::LintContext<'tcx>>::with_lint_attrs
51: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_item
52: rustc::hir::intravisit::walk_mod
53: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::hir::intravisit::Visitor<'tcx>>::visit_mod
54: rustc::hir::intravisit::walk_crate
55: <rustc::lint::context::LateContext<'a, 'tcx> as rustc::lint::context::LintContext<'tcx>>::with_lint_attrs
56: rustc::lint::context::check_crate
57: rustc::util::common::time
58: <std::thread::local::LocalKey<T>>::with
59: rustc::ty::context::tls::enter_global
60: rustc::ty::context::TyCtxt::create_and_enter
61: rustc_driver::driver::phase_3_run_analysis_passes
62: rustc_driver::driver::compile_input
63: rustc_driver::run_compiler_with_pool
64: <scoped_tls::ScopedKey<T>>::set
65: rustc_driver::driver::spawn_thread_pool
66: rustc_driver::run_compiler
67: clippy_driver::main::{{closure}}
at /home/xftroxgpx/build/2nonpkgs/rust.stuff/rust-clippy/src/driver.rs:154
68: rustc_driver::run::{{closure}}::{{closure}}
at /home/xftroxgpx/build/2nonpkgs/rust.stuff/rust/rust/src/librustc_driver/lib.rs:170
69: <scoped_tls::ScopedKey<T>>::set
at /home/xftroxgpx/.cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:155
70: syntax::with_globals::{{closure}}
at /home/xftroxgpx/build/2nonpkgs/rust.stuff/rust/rust/src/libsyntax/lib.rs:113
71: <scoped_tls::ScopedKey<T>>::set
at /home/xftroxgpx/.cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:155
72: syntax::with_globals
at /home/xftroxgpx/build/2nonpkgs/rust.stuff/rust/rust/src/libsyntax/lib.rs:112
73: rustc_driver::run::{{closure}}
at /home/xftroxgpx/build/2nonpkgs/rust.stuff/rust/rust/src/librustc_driver/lib.rs:169
74: rustc_driver::monitor::{{closure}}
at /home/xftroxgpx/build/2nonpkgs/rust.stuff/rust/rust/src/librustc_driver/lib.rs:1566
query stack during panic:
end of query stack
error: aborting due to previous error
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.33.0-dev (ec194646f 2019-01-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
error: Could not compile `serde`.
warning: build failed, waiting for other jobs to finish...
error: build failed
Meta
I used this config.toml
when I compiled rustc
.
$ rustc -vV
!! LD_LIBRARY_PATH=/home/xftroxgpx/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib:/home/xftroxgpx/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib:/home/xftroxgpx/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib:/home/xftroxgpx/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib:/home/xftroxgpx/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib:/home/xftroxgpx/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib:
!! Executing '/home/xftroxgpx/build/2nonpkgs/rust.stuff/rust/rust/build//x86_64-unknown-linux-gnu/stage2/bin//rustc' in pwd='/home/xftroxgpx' with args: '-vV'
rustc 1.33.0-dev (ec194646f 2019-01-02)
binary: rustc
commit-hash: ec194646fef1a467073ad74b8b68f6f202cfce97
commit-date: 2019-01-02
host: x86_64-unknown-linux-gnu
release: 1.33.0-dev
LLVM version: 8.0
$ cargo -vV
!! LD_LIBRARY_PATH=/home/xftroxgpx/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib:/home/xftroxgpx/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib:/home/xftroxgpx/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib:/home/xftroxgpx/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib:/home/xftroxgpx/build/2nonpkgs/rust.stuff/rust/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib:/home/xftroxgpx/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib:
!! Executing '/home/xftroxgpx/build/2nonpkgs/rust.stuff/cargo/cargo//target/release//cargo' in pwd='/home/xftroxgpx' with args: '-vV'
cargo 1.33.0-dev (6e10374b 2019-01-02)
release: 1.33.0
commit-hash: 6e10374b0bceccd6e9de8af0114524337b89a58d
commit-date: 2019-01-02
I'm on ArchLinux x86_64.
Maybe it's something I did, and it's not rustc
's or even clippy
's fault.
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
mati865 commentedon Jan 4, 2019
It's being tracked in rust-lang/rust-clippy#3629
Auto merge of #3631 - phansch:add_itertools_to_integration_tests, r=p…
ghost commentedon Jan 4, 2019
Ok, so I wanted to say the following(and close the issue) but I'm now no longer sure... but instead of deleting all this text and not posting this, i am posting it, but I'm not closing the issue. So consider this undeleted :D
I've since updated and recompiled
rustc
with a changedconfig.toml
setting namelydebug-assertions = false
(wastrue
before, in OP), and I'm no longer hitting this ICE, with latestrust-clippy
commit(possibly due to mitigations ?)I've tried using the same commit of
rust-clippy
from OP but I got other errors(that got fixed by a later commit), so I decided to just use latest commit which was: 8ac411dd42c6612b3184d305f9426e7e364cb211I guess I can close this now, unless someone thinks this ICE can happen in cases unrelated to
rust-clippy
, or that it happens only whendebug-assertions = true
?EDIT: ok I even tested an earlier clippy commit 756b32e1e2ad474097f8d3e510b319dd5023297d to still not ICE, therefore it must be that
debug-assertions = true
when the ICE happens.mati865 commentedon Jan 4, 2019
@xftroxgpx this is actually very useful info.
We were wondering why we cannot reproduce it on Clippy CI, cc @phansch @matthiaskrgr
dlrobertson commentedon Jan 7, 2019
Is this still happening with debug-assertions enabled? I was unable to repro with
debug-assertions = true
.Environment:
rust-clippy@5b8496603c4db231719b67c1f88b409e7b278e5e
rust@b92552d5578e4544006da0dd5e793a19c2149321
I also tried rust-clippy@8ac411dd42c6612b3184d305f9426e7e364cb211
mati865 commentedon Jan 7, 2019
You should try with Clippy commit
194a91c45d5cbeadeb16afd75ce451753b230b81
, if it passes tests then it should be fixed.ghost commentedon Jan 7, 2019
I'll test too, but only after the following PR is resolved:
#57414#57435Lokathor commentedon Jan 8, 2019
Very sorry I messed up that first PR @xftroxgpx XD
People should stop asking me for changes on git
ghost commentedon Jan 8, 2019
@Lokathor no worries :) I couldn't have done it either - I've no idea what's happening there either way :D
5 remaining items
ghost commentedon Jan 9, 2019
@mati865 I meant: it doesn't matter that it error-ed with clippy commit
194a91c45d5cbeadeb16afd75ce451753b230b81
because it didn't err with latest clippy commit.ghost commentedon Jan 9, 2019
Wait, so you're actually saying that the ICE doesn't happen anymore because clippy did a workaround for it? (instead of something in rustc having been fixed since then?)
So that means that with the same clippy commit from OP, I should be able to reproduce the ICE, trying:
I'm getting unrelated errors:
All that got fixed by clippy commit: rust-lang/rust-clippy@756b32e
which I've tried too:
Ok, unless someone can suggest a clippy commit that still reproduces this ICE (instead of giving unrelated errors) I'm going to just not care if this ICE got fixed or not in rust, since it's basically not possible to reproduce anymore due to potentially clippy having worked around it. :DTranslation: I was lazy! but thanks to mati865, I am no more.mati865 commentedon Jan 9, 2019
Clippy removed lint that was causing ICE. It's still unknown if it was bug in the lint or in Rust. It'd be great to readd it when it works.
194a91c45d5cbeadeb16afd75ce451753b230b81
is the latest commit before applying workaround and eventually removing the lint.Clippy uses API that changes very often hence the errors.
dlrobertson
probably fixed them or is using Rust build old enough the API didn't change yet.ghost commentedon Jan 9, 2019
Confirmed the ICE still happens:
it happens because I undid the workaround that clippy applied to avoid this ICE(ie. brought back
random_state
lint), like so:(the above is to be applied on current
rust-clippy
HEAD which is 5b8496603c4db231719b67c1f88b409e7b278e5e)rustc/cargo used
rustc's compile-time
config.toml
can be seen on this gist herealso tested with even newer rustc:
ghost commentedon Jan 9, 2019
ICE has the same message as the following:
#55172
#54158
#50328
#43982
#48141
#47953#46781
That is, this message:
Since some issues mention it happens with
extended=true
, for me it's alreadyfalse
, so that's not a factor. But obviouslydebug-assertions = true
is required![-]error: internal compiler error: src/librustc/ty/context.rs:248[/-][+]error: internal compiler error: src/librustc/ty/context.rs:248 "node {} with HirId::owner {:?} cannot be placed in TypeckTables with local_id_root {:?}"[/+]ghost commentedon Jan 9, 2019
Minimal(to my ability) steps to reproduce this ICE:
config.toml
(click me to expand)It's possible that only
debug-assertions = true
is required and nothing else(compared to normal nightly compiler, let's say), but here are all the settings inconfig.toml
:cd /tmp && git clone https://github.com/rust-lang-nursery/rust-clippy.git
cd rust-clippy && git checkout 5b8496603c4db231719b67c1f88b409e7b278e5e
(that's current latest clippy HEAD)
4. apply this minimal clippy patch (click me to expand)
ie.
cd rust-clippy && patch -Np1 -i ./this.patch
cargo build
(ie. debug mode because it's faster)cd /tmp && cargo new dummy1 && cd dummy1
Cargo.toml
to add dependency linethread_local = "= 0.3.6"
looks like this(click me to expand)
RUST_BACKTRACE=1 /tmp/rust-clippy/target/debug/cargo-clippy
(assuming you're already in
/tmp/dummy1/
directory)What you'll see is approximately this (click me to expand):
error: internal compiler error: src/librustc/ty/context.rs:246: node type $crate::lazy::Lazy<Mutex<ThreadIdManager>> (id=2800) with HirId::owner DefId(0/0:134 ~ thread_local[ca19]::thread_id[0]::{{impl}}[3]::deref[0]::__stability[0]::LAZY[0]) cannot be placed in TypeckTables with local_id_root DefId(0/0:131 ~ thread_local[ca19]::thread_id[0]::{{impl}}[3]::deref[0]::__stability[0])
Here is output with
RUST_LOG=info
.Always validate HIR ID for TypeckTables
Always validate HIR ID for TypeckTables
jonas-schievink commentedon Sep 16, 2019
This should be fixed by #64250