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

ICE: no warnings or errors encountered even though delayed_good_path_bugs issued #![feature(lint_reasons)] #95540

Closed
Tracked by #85549
xFrednet opened this issue Mar 31, 2022 · 1 comment · Fixed by #97718
Assignees
Labels
C-bug Category: This is a bug. F-lint_reasons `#![feature(lint_reasons)]` glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@xFrednet
Copy link
Member

xFrednet commented Mar 31, 2022

Code

// check-pass
#![feature(lint_reasons)]
#![allow(unused)]

#[expect(drop_bounds)]
fn trigger_rustc_lints<T: Drop>() {
}

fn main() {}

Meta

rustc --version --verbose:

rustc 1.61.0-nightly (9f4dc0b4d 2022-03-23)
binary: rustc
commit-hash: 9f4dc0b4db892271cd0dada6e072775b5b5d6b1e
commit-date: 2022-03-23
host: x86_64-unknown-linux-gnu
release: 1.61.0-nightly
LLVM version: 14.0.0

Error output

frednet@xfrednet:~/workspace/rust/lab$ cargo check
    Checking lab v0.1.0 (/home/xfrednet/workspace/rust/lab)
error: internal compiler error: no warnings or errors encountered even though `delayed_good_path_bugs` issued

error: internal compiler error: trimmed_def_paths constructed
  |
  = note: delayed at    0: <rustc_errors::Handler>::delay_good_path_bug
             1: rustc_middle::ty::print::pretty::trimmed_def_paths
             2: <rustc_middle::dep_graph::dep_node::DepKind as rustc_query_system::dep_graph::DepKind>::with_deps::<<rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task_impl<rustc_middle::ty::context::TyCtxt, (), std::collections::hash::map::HashMap<rustc_span::def_id::DefId, rustc_span::symbol::Symbol, core::hash::BuildHasherDefault<rustc_hash::FxHasher>>>::{closure#0}, std::collections::hash::map::HashMap<rustc_span::def_id::DefId, rustc_span::symbol::Symbol, core::hash::BuildHasherDefault<rustc_hash::FxHasher>>>
             3: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, (), std::collections::hash::map::HashMap<rustc_span::def_id::DefId, rustc_span::symbol::Symbol, core::hash::BuildHasherDefault<rustc_hash::FxHasher>>>
          
note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.61.0-nightly (9f4dc0b4d 2022-03-23) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib -C embed-bitcode=no -C debuginfo=2 -C incremental

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

query stack during panic:
end of query stack
error: could not compile `lab`
xfrednet@xfrednet:~/workspace/rust/lab$ 
Backtrace


thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1291:13
stack backtrace:
   0:     0x7f8cd56d680d - std::backtrace_rs::backtrace::libunwind::trace::he1bc69317b314d2e
                               at /rustc/9f4dc0b4db892271cd0dada6e072775b5b5d6b1e/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f8cd56d680d - std::backtrace_rs::backtrace::trace_unsynchronized::h0be7bfa7bff7f915
                               at /rustc/9f4dc0b4db892271cd0dada6e072775b5b5d6b1e/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f8cd56d680d - std::sys_common::backtrace::_print_fmt::h3daff2ba590cbc63
                               at /rustc/9f4dc0b4db892271cd0dada6e072775b5b5d6b1e/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x7f8cd56d680d - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h82b295b0737f92f8
                               at /rustc/9f4dc0b4db892271cd0dada6e072775b5b5d6b1e/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x7f8cd573080c - core::fmt::write::hc116e04c8b781f0a
                               at /rustc/9f4dc0b4db892271cd0dada6e072775b5b5d6b1e/library/core/src/fmt/mod.rs:1190:17
   5:     0x7f8cd56c7e01 - std::io::Write::write_fmt::hdf2c5cf46a74c282
                               at /rustc/9f4dc0b4db892271cd0dada6e072775b5b5d6b1e/library/std/src/io/mod.rs:1655:15
   6:     0x7f8cd56d98f5 - std::sys_common::backtrace::_print::ha38935cfbe56cf33
                               at /rustc/9f4dc0b4db892271cd0dada6e072775b5b5d6b1e/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x7f8cd56d98f5 - std::sys_common::backtrace::print::h5a555af4c956e490
                               at /rustc/9f4dc0b4db892271cd0dada6e072775b5b5d6b1e/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x7f8cd56d98f5 - std::panicking::default_hook::{{closure}}::h7210e8b2ea136c6a
                               at /rustc/9f4dc0b4db892271cd0dada6e072775b5b5d6b1e/library/std/src/panicking.rs:295:22
   9:     0x7f8cd56d95a9 - std::panicking::default_hook::he0b6748cad6a9b81
                               at /rustc/9f4dc0b4db892271cd0dada6e072775b5b5d6b1e/library/std/src/panicking.rs:314:9
  10:     0x7f8cd5e752b1 - rustc_driver[15b9156f6b24bb3]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7f8cd56da040 - std::panicking::rust_panic_with_hook::h7d90789c41819678
                               at /rustc/9f4dc0b4db892271cd0dada6e072775b5b5d6b1e/library/std/src/panicking.rs:702:17
  12:     0x7f8cd6f16c81 - std[7af56082c5a9adab]::panicking::begin_panic::<rustc_errors[afdb89a768619fcf]::ExplicitBug>::{closure#0}
  13:     0x7f8cd6f15cc6 - std[7af56082c5a9adab]::sys_common::backtrace::__rust_end_short_backtrace::<std[7af56082c5a9adab]::panicking::begin_panic<rustc_errors[afdb89a768619fcf]::ExplicitBug>::{closure#0}, !>
  14:     0x7f8cd6f1bd4f - std[7af56082c5a9adab]::panicking::begin_panic::<rustc_errors[afdb89a768619fcf]::ExplicitBug>
  15:     0x7f8cd6f28386 - std[7af56082c5a9adab]::panic::panic_any::<rustc_errors[afdb89a768619fcf]::ExplicitBug>
  16:     0x7f8cd85bae6c - <rustc_errors[afdb89a768619fcf]::HandlerInner as core[ec6d764e948e0586]::ops::drop::Drop>::drop
  17:     0x7f8cd7cf8c98 - core[ec6d764e948e0586]::ptr::drop_in_place::<rustc_session[6f79c38a04c315ff]::parse::ParseSess>
  18:     0x7f8cd7cfb41a - <alloc[c291d8ee38d8ad41]::rc::Rc<rustc_session[6f79c38a04c315ff]::session::Session> as core[ec6d764e948e0586]::ops::drop::Drop>::drop
  19:     0x7f8cd7ce417d - core[ec6d764e948e0586]::ptr::drop_in_place::<rustc_interface[f459bdc7c39711c]::interface::Compiler>
  20:     0x7f8cd7ce3734 - rustc_span[37126335ebbd5d87]::with_source_map::<core[ec6d764e948e0586]::result::Result<(), rustc_errors[afdb89a768619fcf]::ErrorGuaranteed>, rustc_interface[f459bdc7c39711c]::interface::create_compiler_and_run<core[ec6d764e948e0586]::result::Result<(), rustc_errors[afdb89a768619fcf]::ErrorGuaranteed>, rustc_driver[15b9156f6b24bb3]::run_compiler::{closure#1}>::{closure#1}>
  21:     0x7f8cd7cd1184 - rustc_interface[f459bdc7c39711c]::interface::create_compiler_and_run::<core[ec6d764e948e0586]::result::Result<(), rustc_errors[afdb89a768619fcf]::ErrorGuaranteed>, rustc_driver[15b9156f6b24bb3]::run_compiler::{closure#1}>
  22:     0x7f8cd7ccdf02 - <scoped_tls[838f77cdbb45d46c]::ScopedKey<rustc_span[37126335ebbd5d87]::SessionGlobals>>::set::<rustc_interface[f459bdc7c39711c]::interface::run_compiler<core[ec6d764e948e0586]::result::Result<(), rustc_errors[afdb89a768619fcf]::ErrorGuaranteed>, rustc_driver[15b9156f6b24bb3]::run_compiler::{closure#1}>::{closure#0}, core[ec6d764e948e0586]::result::Result<(), rustc_errors[afdb89a768619fcf]::ErrorGuaranteed>>
  23:     0x7f8cd7ccc25f - std[7af56082c5a9adab]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[f459bdc7c39711c]::util::run_in_thread_pool_with_globals<rustc_interface[f459bdc7c39711c]::interface::run_compiler<core[ec6d764e948e0586]::result::Result<(), rustc_errors[afdb89a768619fcf]::ErrorGuaranteed>, rustc_driver[15b9156f6b24bb3]::run_compiler::{closure#1}>::{closure#0}, core[ec6d764e948e0586]::result::Result<(), rustc_errors[afdb89a768619fcf]::ErrorGuaranteed>>::{closure#0}, core[ec6d764e948e0586]::result::Result<(), rustc_errors[afdb89a768619fcf]::ErrorGuaranteed>>
  24:     0x7f8cd7ce44f2 - <<std[7af56082c5a9adab]::thread::Builder>::spawn_unchecked_<rustc_interface[f459bdc7c39711c]::util::run_in_thread_pool_with_globals<rustc_interface[f459bdc7c39711c]::interface::run_compiler<core[ec6d764e948e0586]::result::Result<(), rustc_errors[afdb89a768619fcf]::ErrorGuaranteed>, rustc_driver[15b9156f6b24bb3]::run_compiler::{closure#1}>::{closure#0}, core[ec6d764e948e0586]::result::Result<(), rustc_errors[afdb89a768619fcf]::ErrorGuaranteed>>::{closure#0}, core[ec6d764e948e0586]::result::Result<(), rustc_errors[afdb89a768619fcf]::ErrorGuaranteed>>::{closure#1} as core[ec6d764e948e0586]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  25:     0x7f8cd56e4233 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h547c45aa46469d29
                               at /rustc/9f4dc0b4db892271cd0dada6e072775b5b5d6b1e/library/alloc/src/boxed.rs:1861:9
  26:     0x7f8cd56e4233 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::he0a17443e7e0f241
                               at /rustc/9f4dc0b4db892271cd0dada6e072775b5b5d6b1e/library/alloc/src/boxed.rs:1861:9
  27:     0x7f8cd56e4233 - std::sys::unix::thread::Thread::new::thread_start::hd0dd84768f409ab9
                               at /rustc/9f4dc0b4db892271cd0dada6e072775b5b5d6b1e/library/std/src/sys/unix/thread.rs:108:17
  28:     0x7f8cd5483947 - start_thread
                               at ./nptl/./nptl/pthread_create.c:435:8
  29:     0x7f8cd5513a44 - __GI___clone
                               at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:100
  30:                0x0 - <unknown>

@xFrednet xFrednet added I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. F-lint_reasons `#![feature(lint_reasons)]` labels Mar 31, 2022
@xFrednet
Copy link
Member Author

I'm responsible for this one 😅

@rustbot claim

xFrednet added a commit to xFrednet/glacier that referenced this issue Mar 31, 2022
@rust-lang-glacier-bot rust-lang-glacier-bot added the glacier ICE tracked in rust-lang/glacier. label Mar 31, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this issue Jun 10, 2022
…e-for-expect, r=wesleywiser

Fix `delayed_good_path_bug` ice for expected diagnostics (RFC 2383)

Fixes a small ICE with the `delayed_good_path_bug` check.

---

r? `@wesleywiser`

cc: `@eddyb` this might be interesting, since you've added a `FIXME` comment above the modified check which kind of discusses a case like this

closes: rust-lang#95540

cc: rust-lang#85549
@bors bors closed this as completed in 1840454 Jun 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. F-lint_reasons `#![feature(lint_reasons)]` glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants