{"action":"opened","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/54272","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/54272/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/54272/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/54272/events","html_url":"https://github.com/rust-lang/rust/issues/54272","id":360628628,"node_id":"MDU6SXNzdWUzNjA2Mjg2Mjg=","number":54272,"title":"Compiler panic on on_disk_cache","user":{"login":"drager","id":1957563,"node_id":"MDQ6VXNlcjE5NTc1NjM=","avatar_url":"https://avatars1.githubusercontent.com/u/1957563?v=4","gravatar_id":"","url":"https://api.github.com/users/drager","html_url":"https://github.com/drager","followers_url":"https://api.github.com/users/drager/followers","following_url":"https://api.github.com/users/drager/following{/other_user}","gists_url":"https://api.github.com/users/drager/gists{/gist_id}","starred_url":"https://api.github.com/users/drager/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drager/subscriptions","organizations_url":"https://api.github.com/users/drager/orgs","repos_url":"https://api.github.com/users/drager/repos","events_url":"https://api.github.com/users/drager/events{/privacy}","received_events_url":"https://api.github.com/users/drager/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-16T11:06:43Z","updated_at":"2018-09-16T11:06:43Z","closed_at":null,"author_association":"NONE","body":"Hey,\r\n\r\nI stumbled upon some an error while trying to run my code using `cargo run` (running `cargo check` works just fine). My code that errors can be found here: https://github.com/drager/handle/tree/with-handle3. The master branch works fine however and can be run without errors: https://github.com/drager/handle\r\n\r\n**Other information**\r\nInstalled Rust via rustup\r\nOS: Arch Linux x86_64\r\n\r\n**Error**\r\nHere's the full output from the attempt:\r\n```cargo run     \r\n   Compiling handler v0.1.0 (file:///home/drager/development/handle)\r\nwarning: field is never used: `config`\r\n  --> src/main.rs:93:9\r\n   |\r\n93 |         config: &'a Config<'b>,\r\n   |         ^^^^^^^^^^^^^^^^^^^^^^\r\n   |\r\n   = note: #[warn(dead_code)] on by default\r\n\r\nwarning: field is never used: `config`\r\n   --> src/main.rs:217:9\r\n    |\r\n217 |         config: &'a Config,\r\n    |         ^^^^^^^^^^^^^^^^^^\r\n\r\nwarning: field is never used: `logger_handle`\r\n   --> src/main.rs:219:9\r\n    |\r\n219 |         logger_handle: &'a logger::Handle<'b, 'b>,\r\n    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n\r\nthread 'main' panicked at 'assertion failed: `(left == right)`\r\n  left: `105`,\r\n right: `49641`', librustc/ty/query/on_disk_cache.rs:532:5\r\nnote: Run with `RUST_BACKTRACE=1` for a backtrace.\r\n\r\nerror: internal compiler error: unexpected panic\r\n\r\nnote: the compiler unexpectedly panicked. this is a bug.\r\n\r\nnote: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports\r\n\r\nnote: rustc 1.28.0 (9634041f0 2018-07-30) running on x86_64-unknown-linux-gnu\r\n\r\nnote: compiler flags: -C debuginfo=2 -C incremental --crate-type bin\r\n\r\nnote: some of the compiler flags provided by cargo are hidden\r\n\r\nerror: Could not compile `handler`.\r\n```\r\n\r\n**Backtrace**:\r\n```\r\nthread 'main' panicked at 'assertion failed: `(left == right)`\r\n  left: `105`,\r\n right: `49641`', librustc/ty/query/on_disk_cache.rs:532:5\r\nstack backtrace:\r\n   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace\r\n             at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49\r\n   1: std::sys_common::backtrace::print\r\n             at libstd/sys_common/backtrace.rs:71\r\n             at libstd/sys_common/backtrace.rs:59\r\n   2: std::panicking::default_hook::{{closure}}\r\n             at libstd/panicking.rs:211\r\n   3: std::panicking::default_hook\r\n             at libstd/panicking.rs:227\r\n   4: rustc::util::common::panic_hook\r\n   5: std::panicking::rust_panic_with_hook\r\n             at libstd/panicking.rs:515\r\n   6: std::panicking::continue_panic_fmt\r\n             at libstd/panicking.rs:426\r\n   7: std::panicking::begin_panic_fmt\r\n             at libstd/panicking.rs:413\r\n   8: rustc::ty::query::on_disk_cache::OnDiskCache::try_load_query_result\r\n   9: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query\r\n  10: rustc::ty::query::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::symbol_name\r\n  11: rustc_mir::monomorphize::item::MonoItemExt::symbol_name\r\n  12: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter\r\n  13: rustc_mir::monomorphize::assert_symbols_are_distinct\r\n  14: rustc_codegen_llvm::base::collect_and_partition_mono_items\r\n  15: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors<'tcx> for rustc::ty::query::queries::collect_and_partition_mono_items<'tcx>>::compute\r\n  16: rustc::ty::context::tls::with_context\r\n  17: rustc::dep_graph::graph::DepGraph::with_task_impl\r\n  18: rustc::ty::context::tls::with_related_context\r\n  19: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job\r\n  20: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query\r\n  21: rustc_codegen_llvm::base::codegen_crate\r\n  22: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_utils::codegen_backend::CodegenBackend>::codegen_crate\r\n  23: rustc::util::common::time\r\n  24: rustc_driver::driver::phase_4_codegen\r\n  25: rustc_driver::driver::compile_input::{{closure}}\r\n  26: rustc::ty::context::tls::enter_context\r\n  27: <std::thread::local::LocalKey<T>>::with\r\n  28: rustc::ty::context::TyCtxt::create_and_enter\r\n  29: rustc_driver::driver::compile_input\r\n  30: rustc_driver::run_compiler_with_pool\r\n  31: <scoped_tls::ScopedKey<T>>::set\r\n  32: syntax::with_globals\r\n  33: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once\r\n  34: __rust_maybe_catch_panic\r\n             at libpanic_unwind/lib.rs:105\r\n  35: rustc_driver::run\r\n  36: rustc_driver::main\r\n  37: std::rt::lang_start::{{closure}}\r\n  38: std::panicking::try::do_call\r\n             at libstd/rt.rs:59\r\n             at libstd/panicking.rs:310\r\n  39: __rust_maybe_catch_panic\r\n             at libpanic_unwind/lib.rs:105\r\n  40: std::rt::lang_start_internal\r\n             at libstd/panicking.rs:289\r\n             at libstd/panic.rs:392\r\n             at libstd/rt.rs:58\r\n  41: main\r\n  42: __libc_start_main\r\n  43: <unknown>\r\nquery stack during panic:\r\n#0 [collect_and_partition_mono_items] collect_and_partition_mono_items\r\nend of query stack\r\n```\r\n\r\n`cargo run` with `--verbose`:\r\n\r\n```RUST_BACKTRACE=1 cargo run --verbose\r\n       Fresh unicode-xid v0.1.0\r\n       Fresh version_check v0.1.4\r\n       Fresh libc v0.2.43\r\n       Fresh antidote v1.0.0\r\n       Fresh cfg-if v0.1.5\r\n       Fresh byteorder v1.2.6\r\n       Fresh bitflags v1.0.4\r\n       Fresh slog v2.3.3\r\n       Fresh take_mut v0.2.2\r\n       Fresh proc-macro2 v0.3.8\r\n       Fresh time v0.1.40\r\n       Fresh scheduled-thread-pool v0.2.0\r\n       Fresh log v0.4.5\r\n       Fresh isatty v0.1.9\r\n       Fresh term v0.5.1\r\n       Fresh quote v0.5.2\r\n       Fresh num-traits v0.2.5\r\n       Fresh proc-macro2 v0.4.19\r\n       Fresh pq-sys v0.4.6\r\n       Fresh r2d2 v0.8.2\r\n       Fresh serde v1.0.78\r\n       Fresh syn v0.13.11\r\n       Fresh lazy_static v1.1.0\r\n       Fresh num-integer v0.1.39\r\n       Fresh quote v0.6.8\r\n       Fresh diesel_derives v1.3.0\r\n       Fresh thread_local v0.3.6\r\n       Fresh chrono v0.4.6\r\n       Fresh syn v0.15.4\r\n       Fresh diesel v1.3.2\r\n       Fresh slog-async v2.3.0\r\n       Fresh slog-term v2.4.0\r\n       Fresh serde_derive v1.0.78\r\n       Fresh r2d2-diesel v1.0.0\r\n   Compiling handler v0.1.0 (file:///home/drager/development/handle)\r\n     Running `rustc --crate-name handler src/main.rs --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=d25e4ad03d5eb1e9 -C extra-filename=-d25e4ad03d5eb1e9 --out-dir /home/drager/development/handle/target/debug/deps -C incremental=/home/drager/development/handle/target/debug/incremental -L dependency=/home/drager/development/handle/target/debug/deps --extern diesel=/home/drager/development/handle/target/debug/deps/libdiesel-0976950f95418f39.rlib --extern r2d2=/home/drager/development/handle/target/debug/deps/libr2d2-be4830cf82818a3b.rlib --extern r2d2_diesel=/home/drager/development/handle/target/debug/deps/libr2d2_diesel-b4dc008b83f4c9b5.rlib --extern serde=/home/drager/development/handle/target/debug/deps/libserde-5768b7af984bb420.rlib --extern serde_derive=/home/drager/development/handle/target/debug/deps/libserde_derive-802a57c49f18d38a.so --extern slog_async=/home/drager/development/handle/target/debug/deps/libslog_async-4a297d4b8cdadbb4.rlib --extern slog=/home/drager/development/handle/target/debug/deps/libslog-b8378d34b0be1ee3.rlib --extern slog_term=/home/drager/development/handle/target/debug/deps/libslog_term-5a1f7eafc342ee34.rlib -L native=/usr/lib`\r\nwarning: field is never used: `config`\r\n  --> src/main.rs:93:9\r\n   |\r\n93 |         config: &'a Config<'b>,\r\n   |         ^^^^^^^^^^^^^^^^^^^^^^\r\n   |\r\n   = note: #[warn(dead_code)] on by default\r\n\r\nwarning: field is never used: `config`\r\n   --> src/main.rs:217:9\r\n    |\r\n217 |         config: &'a Config,\r\n    |         ^^^^^^^^^^^^^^^^^^\r\n\r\nwarning: field is never used: `logger_handle`\r\n   --> src/main.rs:219:9\r\n    |\r\n219 |         logger_handle: &'a logger::Handle<'b, 'b>,\r\n    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n\r\nthread 'main' panicked at 'assertion failed: `(left == right)`\r\n  left: `105`,\r\n right: `49641`', librustc/ty/query/on_disk_cache.rs:532:5\r\nstack backtrace:\r\n   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace\r\n             at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49\r\n   1: std::sys_common::backtrace::print\r\n             at libstd/sys_common/backtrace.rs:71\r\n             at libstd/sys_common/backtrace.rs:59\r\n   2: std::panicking::default_hook::{{closure}}\r\n             at libstd/panicking.rs:211\r\n   3: std::panicking::default_hook\r\n             at libstd/panicking.rs:227\r\n   4: rustc::util::common::panic_hook\r\n   5: std::panicking::rust_panic_with_hook\r\n             at libstd/panicking.rs:515\r\n   6: std::panicking::continue_panic_fmt\r\n             at libstd/panicking.rs:426\r\n   7: std::panicking::begin_panic_fmt\r\n             at libstd/panicking.rs:413\r\n   8: rustc::ty::query::on_disk_cache::OnDiskCache::try_load_query_result\r\n   9: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query\r\n  10: rustc::ty::query::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::symbol_name\r\n  11: rustc_mir::monomorphize::item::MonoItemExt::symbol_name\r\n  12: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter\r\n  13: rustc_mir::monomorphize::assert_symbols_are_distinct\r\n  14: rustc_codegen_llvm::base::collect_and_partition_mono_items\r\n  15: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors<'tcx> for rustc::ty::query::queries::collect_and_partition_mono_items<'tcx>>::compute\r\n  16: rustc::ty::context::tls::with_context\r\n  17: rustc::dep_graph::graph::DepGraph::with_task_impl\r\n  18: rustc::ty::context::tls::with_related_context\r\n  19: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job\r\n  20: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query\r\n  21: rustc_codegen_llvm::base::codegen_crate\r\n  22: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_utils::codegen_backend::CodegenBackend>::codegen_crate\r\n  23: rustc::util::common::time\r\n  24: rustc_driver::driver::phase_4_codegen\r\n  25: rustc_driver::driver::compile_input::{{closure}}\r\n  26: rustc::ty::context::tls::enter_context\r\n  27: <std::thread::local::LocalKey<T>>::with\r\n  28: rustc::ty::context::TyCtxt::create_and_enter\r\n  29: rustc_driver::driver::compile_input\r\n  30: rustc_driver::run_compiler_with_pool\r\n  31: <scoped_tls::ScopedKey<T>>::set\r\n  32: syntax::with_globals\r\n  33: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once\r\n  34: __rust_maybe_catch_panic\r\n             at libpanic_unwind/lib.rs:105\r\n  35: rustc_driver::run\r\n  36: rustc_driver::main\r\n  37: std::rt::lang_start::{{closure}}\r\n  38: std::panicking::try::do_call\r\n             at libstd/rt.rs:59\r\n             at libstd/panicking.rs:310\r\n  39: __rust_maybe_catch_panic\r\n             at libpanic_unwind/lib.rs:105\r\n  40: std::rt::lang_start_internal\r\n             at libstd/panicking.rs:289\r\n             at libstd/panic.rs:392\r\n             at libstd/rt.rs:58\r\n  41: main\r\n  42: __libc_start_main\r\n  43: <unknown>\r\nquery stack during panic:\r\n#0 [collect_and_partition_mono_items] collect_and_partition_mono_items\r\nend of query stack\r\n\r\nerror: internal compiler error: unexpected panic\r\n\r\nnote: the compiler unexpectedly panicked. this is a bug.\r\n\r\nnote: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports\r\n\r\nnote: rustc 1.28.0 (9634041f0 2018-07-30) running on x86_64-unknown-linux-gnu\r\n\r\nnote: compiler flags: -C debuginfo=2 -C incremental --crate-type bin\r\n\r\nnote: some of the compiler flags provided by cargo are hidden\r\n\r\nerror: Could not compile `handler`.\r\n\r\nCaused by:\r\n  process didn't exit successfully: `rustc --crate-name handler src/main.rs --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=d25e4ad03d5eb1e9 -C extra-filename=-d25e4ad03d5eb1e9 --out-dir /home/drager/development/handle/target/debug/deps -C incremental=/home/drager/development/handle/target/debug/incremental -L dependency=/home/drager/development/handle/target/debug/deps --extern diesel=/home/drager/development/handle/target/debug/deps/libdiesel-0976950f95418f39.rlib --extern r2d2=/home/drager/development/handle/target/debug/deps/libr2d2-be4830cf82818a3b.rlib --extern r2d2_diesel=/home/drager/development/handle/target/debug/deps/libr2d2_diesel-b4dc008b83f4c9b5.rlib --extern serde=/home/drager/development/handle/target/debug/deps/libserde-5768b7af984bb420.rlib --extern serde_derive=/home/drager/development/handle/target/debug/deps/libserde_derive-802a57c49f18d38a.so --extern slog_async=/home/drager/development/handle/target/debug/deps/libslog_async-4a297d4b8cdadbb4.rlib --extern slog=/home/drager/development/handle/target/debug/deps/libslog-b8378d34b0be1ee3.rlib --extern slog_term=/home/drager/development/handle/target/debug/deps/libslog_term-5a1f7eafc342ee34.rlib -L native=/usr/lib` (exit code: 101)``` "}}
{"actor":{"display_login":"drager"}}