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: rustdoc on overlap-not-permitted-for-builtin-trait.rs: unable to fulfill trait #79466

Closed
matthiaskrgr opened this issue Nov 27, 2020 · 2 comments
Labels
C-bug Category: This is a bug. glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-low Low priority requires-nightly This issue requires a nightly compiler in some way. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@matthiaskrgr
Copy link
Member

Code

code from ./src/test/ui/traits/overlap-not-permitted-for-builtin-trait.rs

#![allow(dead_code)]
#![feature(negative_impls)]

// Overlapping negative impls for `MyStruct` are not permitted:
struct MyStruct;
impl !Send for MyStruct {}
impl !Send for MyStruct {}
//~^ ERROR conflicting implementations of trait

fn main() {}

Meta

rustc --version --verbose:

rustdoc 1.50.0-nightly (1c389ffef 2020-11-24)
binary: rustdoc
commit-hash: 1c389ffeff814726dec325f0f2b0c99107df2673
commit-date: 2020-11-24
host: x86_64-unknown-linux-gnu
release: 1.50.0-nightly

Error output

thread 'rustc' panicked at 'Unable to fulfill trait DefId(2:2049 ~ core[27a9]::marker::Send) for 'MyStruct': [FulfillmentError(Obligation(predicate=TraitPredicate(<MyStruct as std::marker::Send>), depth=0),Ambiguity)]', /rustc/1c389ffeff814726dec325f0f2b0c99107df2673/compiler/rustc_trait_selection/src/traits/auto_trait.rs:193:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

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/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.50.0-nightly (1c389ffef 2020-11-24) running on x86_64-unknown-linux-gnu

query stack during panic:
end of query stack
Backtrace

hread 'rustc' panicked at 'Unable to fulfill trait DefId(2:2049 ~ core[27a9]::marker::Send) for 'MyStruct': [FulfillmentError(Obligation(predicate=TraitPredicate(<MyStruct as std::marker::Send>), depth=0),Ambiguity)]', /rustc/1c389ffeff814726dec325f0f2b0c99107df2673/compiler/rustc_trait_selection/src/traits/auto_trait.rs:193:17
stack backtrace:
   0:     0x7ff9fb0ffe30 - std::backtrace_rs::backtrace::libunwind::trace::h746c3e9529d524bc
                               at /rustc/1c389ffeff814726dec325f0f2b0c99107df2673/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
   1:     0x7ff9fb0ffe30 - std::backtrace_rs::backtrace::trace_unsynchronized::h86340908ff889faa
                               at /rustc/1c389ffeff814726dec325f0f2b0c99107df2673/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7ff9fb0ffe30 - std::sys_common::backtrace::_print_fmt::h43f85f9b18230404
                               at /rustc/1c389ffeff814726dec325f0f2b0c99107df2673/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x7ff9fb0ffe30 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hc132ae1a5b5aa7cd
                               at /rustc/1c389ffeff814726dec325f0f2b0c99107df2673/library/std/src/sys_common/backtrace.rs:46:22
   4:     0x7ff9fb172c4c - core::fmt::write::hdf023a0036d2a25f
                               at /rustc/1c389ffeff814726dec325f0f2b0c99107df2673/library/core/src/fmt/mod.rs:1078:17
   5:     0x7ff9fb0f19a2 - std::io::Write::write_fmt::h8580846154bcb66a
                               at /rustc/1c389ffeff814726dec325f0f2b0c99107df2673/library/std/src/io/mod.rs:1519:15
   6:     0x7ff9fb103a95 - std::sys_common::backtrace::_print::h7ee55fed88d107a3
                               at /rustc/1c389ffeff814726dec325f0f2b0c99107df2673/library/std/src/sys_common/backtrace.rs:49:5
   7:     0x7ff9fb103a95 - std::sys_common::backtrace::print::h54a7d3e52a524177
                               at /rustc/1c389ffeff814726dec325f0f2b0c99107df2673/library/std/src/sys_common/backtrace.rs:36:9
   8:     0x7ff9fb103a95 - std::panicking::default_hook::{{closure}}::h60921e857bf55a40
                               at /rustc/1c389ffeff814726dec325f0f2b0c99107df2673/library/std/src/panicking.rs:208:50
   9:     0x7ff9fb1035ea - std::panicking::default_hook::hf0f9afb1017317fc
                               at /rustc/1c389ffeff814726dec325f0f2b0c99107df2673/library/std/src/panicking.rs:225:9
  10:     0x7ff9fb990bb8 - rustc_driver::report_ice::ha25ae86a5858acc3
  11:     0x7ff9fb104396 - std::panicking::rust_panic_with_hook::h8d66bf42b407aaea
                               at /rustc/1c389ffeff814726dec325f0f2b0c99107df2673/library/std/src/panicking.rs:595:17
  12:     0x7ff9fb103eb7 - std::panicking::begin_panic_handler::{{closure}}::hde71edcd925d0c5e
                               at /rustc/1c389ffeff814726dec325f0f2b0c99107df2673/library/std/src/panicking.rs:497:13
  13:     0x7ff9fb1002ec - std::sys_common::backtrace::__rust_end_short_backtrace::h8a3c7d6cea578919
                               at /rustc/1c389ffeff814726dec325f0f2b0c99107df2673/library/std/src/sys_common/backtrace.rs:141:18
  14:     0x7ff9fb103e19 - rust_begin_unwind
                               at /rustc/1c389ffeff814726dec325f0f2b0c99107df2673/library/std/src/panicking.rs:493:5
  15:     0x7ff9fb103dcb - std::panicking::begin_panic_fmt::hee67ce14b77d0396
                               at /rustc/1c389ffeff814726dec325f0f2b0c99107df2673/library/std/src/panicking.rs:435:5
  16:     0x559298e2b2f0 - rustc_trait_selection::traits::auto_trait::AutoTraitFinder::find_auto_trait_generics::{{closure}}::{{closure}}::h2cca4e6ec6acf209
  17:     0x559298e1d561 - rustc_infer::infer::InferCtxtBuilder::enter::hd535b0600c13c07b
  18:     0x559298d3a6f8 - rustc_trait_selection::traits::auto_trait::AutoTraitFinder::find_auto_trait_generics::h3e6f0b992fc91d80
  19:     0x559298e2e821 - core::ops::function::impls::<impl core::ops::function::FnMut<A> for &mut F>::call_mut::h9ebd0359a0d784f8
  20:     0x559298fb4269 - <alloc::vec::Vec<T> as alloc::vec::SpecFromIter<T,I>>::from_iter::h41802ce24eaf1fb0
  21:     0x559298f417f8 - rustdoc::clean::utils::get_auto_trait_and_blanket_impls::h38708bc1e4d8b0b8
  22:     0x559298cc94d7 - <rustdoc::passes::collect_trait_impls::SyntheticImplCollector as rustdoc::fold::DocFolder>::fold_item::h217a0b74ff87ad2f
  23:     0x559298fb192a - <alloc::vec::Vec<T> as alloc::vec::SpecFromIter<T,I>>::from_iter::h7133d90fc589f51b
  24:     0x559298cbab5c - rustdoc::fold::DocFolder::fold_inner_recur::h7f389b925cd18d4e
  25:     0x559298cc9383 - <rustdoc::passes::collect_trait_impls::SyntheticImplCollector as rustdoc::fold::DocFolder>::fold_item::h217a0b74ff87ad2f
  26:     0x559298cc67d4 - rustdoc::passes::collect_trait_impls::collect_trait_impls::h4af45e32e779fa37
  27:     0x559298cb8acf - rustdoc::core::run_global_ctxt::h7cf39be6ea65128e
  28:     0x559298d31ece - rustc_interface::passes::QueryContext::enter::hedb615e17429b641
  29:     0x559298e27917 - rustc_interface::interface::create_compiler_and_run::h25fa5935e40978f2
  30:     0x559298cce0d3 - rustdoc::main_options::h8a5cda9c1c8c625b
  31:     0x559298e18a68 - rustc_span::with_session_globals::h7a83fbbd64fb6823
  32:     0x559298cff30e - std::sys_common::backtrace::__rust_begin_short_backtrace::h50722f4a01515f7b
  33:     0x559298e3103a - core::ops::function::FnOnce::call_once{{vtable.shim}}::h22276985fb540191
  34:     0x7ff9fb11365a - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hea1090dbdcecbf5a
                               at /rustc/1c389ffeff814726dec325f0f2b0c99107df2673/library/alloc/src/boxed.rs:1318:9
  35:     0x7ff9fb11365a - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h8d5723d3912bd325
                               at /rustc/1c389ffeff814726dec325f0f2b0c99107df2673/library/alloc/src/boxed.rs:1318:9
  36:     0x7ff9fb11365a - std::sys::unix::thread::Thread::new::thread_start::hc17a425ca2995724
                               at /rustc/1c389ffeff814726dec325f0f2b0c99107df2673/library/std/src/sys/unix/thread.rs:71:17
  37:     0x7ff9fafef3e9 - start_thread
  38:     0x7ff9fadd5293 - __GI___clone
  39:                0x0 - <unknown>

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/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.50.0-nightly (1c389ffef 2020-11-24) running on x86_64-unknown-linux-gnu

query stack during panic:
end of query stack

@matthiaskrgr matthiaskrgr added C-bug Category: This is a bug. 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. labels Nov 27, 2020
@jyn514 jyn514 added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. and removed T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 27, 2020
@jyn514
Copy link
Member

jyn514 commented Dec 20, 2020

I expect this is the same sort of issue as #73566 (comment) where rustdoc doesn't run typeck passes that other parts of the compiler assume have been run.

Assigning P-low by the same rationale as #79496 (comment).

@jyn514 jyn514 added the P-low Low priority label Dec 20, 2020
@Aaron1011 Aaron1011 added the requires-nightly This issue requires a nightly compiler in some way. label Jan 18, 2021
@rust-lang-glacier-bot rust-lang-glacier-bot added the glacier ICE tracked in rust-lang/glacier. label Feb 19, 2022
@Alexendoo
Copy link
Member

No longer ICEs since #95333

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. glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-low Low priority requires-nightly This issue requires a nightly compiler in some way. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

6 participants