Closed
Description
Code
rustdoc code.rs
// code.rs
trait MyTrait {}
struct Inner;
struct Outer(Inner);
unsafe impl<Q> Send for Inner
where
Q: MyTrait
{}
Meta
rustc --version --verbose
:
rustc 1.72.0-nightly (fe7454bf4 2023-06-19)
binary: rustc
commit-hash: fe7454bf439c93cbe9ac8a8f7fcfacd5a40244c2
commit-date: 2023-06-19
host: aarch64-apple-darwin
release: 1.72.0-nightly
LLVM version: 16.0.5
Error output
<output>
Backtrace
thread 'rustc' panicked at 'Unable to fulfill trait DefId(2:2683 ~ core[0f69]::marker::Send) for 'Outer': [FulfillmentError(Obligation(predicate=Binder(TraitPredicate(<_ as std::marker::Sized>, polarity:Positive), []), depth=2),Ambiguity), FulfillmentError(Obligation(predicate=Binder(TraitPredicate(<_ as MyTrait>, polarity:Positive), []), depth=2),Ambiguity)]', /rustc/fe7454bf439c93cbe9ac8a8f7fcfacd5a40244c2/compiler/rustc_trait_selection/src/traits/auto_trait.rs:186:13
stack backtrace:
0: 0x1015c40f4 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h98bf6f1b8a3176b4
1: 0x10161475c - core::fmt::write::h32b4394822667739
2: 0x1015b999c - std::io::Write::write_fmt::h19e6965a4f1b2789
3: 0x1015c3f4c - std::sys_common::backtrace::print::h75a318905bc68cf1
4: 0x1015c6ac8 - std::panicking::default_hook::{{closure}}::hd804ed281d7e08a7
5: 0x1015c6858 - std::panicking::default_hook::hf1f7a911542630ee
6: 0x109b456cc - rustc_driver_impl[d5bfd45cb53215fb]::install_ice_hook::{closure#0}
7: 0x1015c7248 - std::panicking::rust_panic_with_hook::h74c8b87d4371442c
8: 0x1015c701c - std::panicking::begin_panic_handler::{{closure}}::hd7ff9b18e4ab7574
9: 0x1015c44d4 - std::sys_common::backtrace::__rust_end_short_backtrace::hdc7391160fc74630
10: 0x1015c6d88 - _rust_begin_unwind
11: 0x10163f924 - core::panicking::panic_fmt::hb1c27fe21c4f1f37
12: 0x100300f28 - <rustc_trait_selection[3bfe20a7ab0ad0d3]::traits::auto_trait::AutoTraitFinder>::find_auto_trait_generics::<rustdoc[e386f36fe3828e32]::clean::types::Generics, <rustdoc[e386f36fe3828e32]::clean::auto_trait::AutoTraitFinder>::generate_for_trait::{closure#0}>
13: 0x1004030b0 - <rustdoc[e386f36fe3828e32]::clean::auto_trait::AutoTraitFinder>::generate_for_trait
14: 0x100445ad4 - <alloc[480d25cc58e20263]::vec::Vec<rustdoc[e386f36fe3828e32]::clean::types::Item> as alloc[480d25cc58e20263]::vec::spec_from_iter::SpecFromIter<rustdoc[e386f36fe3828e32]::clean::types::Item, core[f69943f7197f08d]::iter::adapters::filter_map::FilterMap<alloc[480d25cc58e20263]::vec::into_iter::IntoIter<rustc_span[131a45c9b4032fd]::def_id::DefId>, <rustdoc[e386f36fe3828e32]::clean::auto_trait::AutoTraitFinder>::get_auto_trait_impls::{closure#0}>>>::from_iter
15: 0x100403698 - <rustdoc[e386f36fe3828e32]::clean::auto_trait::AutoTraitFinder>::get_auto_trait_impls
16: 0x100395f54 - rustdoc[e386f36fe3828e32]::clean::utils::get_auto_trait_and_blanket_impls
17: 0x10052afa0 - <rustdoc[e386f36fe3828e32]::passes::collect_trait_impls::SyntheticImplCollector as rustdoc[e386f36fe3828e32]::visit::DocVisitor>::visit_item
18: 0x10052b070 - <rustdoc[e386f36fe3828e32]::passes::collect_trait_impls::SyntheticImplCollector as rustdoc[e386f36fe3828e32]::visit::DocVisitor>::visit_item
19: 0x10052c36c - <rustdoc[e386f36fe3828e32]::passes::collect_trait_impls::SyntheticImplCollector as rustdoc[e386f36fe3828e32]::visit::DocVisitor>::visit_crate
20: 0x10039e61c - <rustc_session[b33ec7bea72ab9c0]::session::Session>::time::<alloc[480d25cc58e20263]::vec::Vec<rustdoc[e386f36fe3828e32]::clean::types::Item>, rustdoc[e386f36fe3828e32]::passes::collect_trait_impls::collect_trait_impls::{closure#0}>
21: 0x100528cfc - rustdoc[e386f36fe3828e32]::passes::collect_trait_impls::collect_trait_impls
22: 0x10039e914 - <rustc_session[b33ec7bea72ab9c0]::session::Session>::time::<rustdoc[e386f36fe3828e32]::clean::types::Crate, rustdoc[e386f36fe3828e32]::core::run_global_ctxt::{closure#7}>
23: 0x100526c94 - rustdoc[e386f36fe3828e32]::core::run_global_ctxt
24: 0x10039ec58 - <rustc_session[b33ec7bea72ab9c0]::session::Session>::time::<(rustdoc[e386f36fe3828e32]::clean::types::Crate, rustdoc[e386f36fe3828e32]::config::RenderOptions, rustdoc[e386f36fe3828e32]::formats::cache::Cache), rustdoc[e386f36fe3828e32]::main_args::{closure#1}::{closure#0}::{closure#0}::{closure#0}>
25: 0x10037c4ac - <rustc_middle[69929678d7438a39]::ty::context::GlobalCtxt>::enter::<rustdoc[e386f36fe3828e32]::main_args::{closure#1}::{closure#0}::{closure#0}, core[f69943f7197f08d]::result::Result<(), rustc_span[131a45c9b4032fd]::ErrorGuaranteed>>
26: 0x1003cfb54 - <rustc_interface[f4474a023a28a1e1]::interface::Compiler>::enter::<rustdoc[e386f36fe3828e32]::main_args::{closure#1}::{closure#0}, core[f69943f7197f08d]::result::Result<(), rustc_span[131a45c9b4032fd]::ErrorGuaranteed>>
27: 0x10047b0b4 - rustc_span[131a45c9b4032fd]::set_source_map::<core[f69943f7197f08d]::result::Result<(), rustc_span[131a45c9b4032fd]::ErrorGuaranteed>, rustc_interface[f4474a023a28a1e1]::interface::run_compiler<core[f69943f7197f08d]::result::Result<(), rustc_span[131a45c9b4032fd]::ErrorGuaranteed>, rustdoc[e386f36fe3828e32]::main_args::{closure#1}>::{closure#0}::{closure#0}>
28: 0x100533b38 - <scoped_tls[14441d0542f530d4]::ScopedKey<rustc_span[131a45c9b4032fd]::SessionGlobals>>::set::<rustc_interface[f4474a023a28a1e1]::interface::run_compiler<core[f69943f7197f08d]::result::Result<(), rustc_span[131a45c9b4032fd]::ErrorGuaranteed>, rustdoc[e386f36fe3828e32]::main_args::{closure#1}>::{closure#0}, core[f69943f7197f08d]::result::Result<(), rustc_span[131a45c9b4032fd]::ErrorGuaranteed>>
29: 0x1003ad540 - std[305047cfbd8f31b0]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[f4474a023a28a1e1]::util::run_in_thread_pool_with_globals<rustc_interface[f4474a023a28a1e1]::interface::run_compiler<core[f69943f7197f08d]::result::Result<(), rustc_span[131a45c9b4032fd]::ErrorGuaranteed>, rustdoc[e386f36fe3828e32]::main_args::{closure#1}>::{closure#0}, core[f69943f7197f08d]::result::Result<(), rustc_span[131a45c9b4032fd]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[f69943f7197f08d]::result::Result<(), rustc_span[131a45c9b4032fd]::ErrorGuaranteed>>
30: 0x100495fb0 - <<std[305047cfbd8f31b0]::thread::Builder>::spawn_unchecked_<rustc_interface[f4474a023a28a1e1]::util::run_in_thread_pool_with_globals<rustc_interface[f4474a023a28a1e1]::interface::run_compiler<core[f69943f7197f08d]::result::Result<(), rustc_span[131a45c9b4032fd]::ErrorGuaranteed>, rustdoc[e386f36fe3828e32]::main_args::{closure#1}>::{closure#0}, core[f69943f7197f08d]::result::Result<(), rustc_span[131a45c9b4032fd]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[f69943f7197f08d]::result::Result<(), rustc_span[131a45c9b4032fd]::ErrorGuaranteed>>::{closure#1} as core[f69943f7197f08d]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
31: 0x1015cfa6c - std::sys::unix::thread::Thread::new::thread_start::hdf5e17a1fe30b937
32: 0x191d6bfa8 - __pthread_joiner_wake
error: 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-rustdoc&template=ice.md
note: rustc 1.72.0-nightly (fe7454bf4 2023-06-19) running on aarch64-apple-darwin
query stack during panic:
end of query stack
Metadata
Metadata
Assignees
Labels
Area: auto traits (e.g., `auto trait Send {}`)Area: Synthetic impls, used by rustdoc to document auto traits and traits with blanket implsCategory: This is a bug.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Medium priorityRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.Performance or correctness regression from one stable version to another.