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

rustdoc: ICE: synthetic auto trait impls: unexpected region: RePlaceholder[…] involving TAIT #120606

Open
Sherlock-Holo opened this issue Feb 3, 2024 · 1 comment
Assignees
Labels
A-auto-traits Area: auto traits (`auto trait Send`) A-lifetimes Area: lifetime related A-synthetic-impls Area: Synthetic impls, used by rustdoc to document auto traits and traits with blanket impls C-bug Category: This is a bug. F-type_alias_impl_trait `#[feature(type_alias_impl_trait)]` I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@Sherlock-Holo
Copy link

Code

this commit codes Sherlock-Holo/compio_compat@468c054

Meta

rustc --version --verbose:

rustc 1.77.0-nightly (bf3c6c5be 2024-02-01)
binary: rustc
commit-hash: bf3c6c5bed498f41ad815641319a1ad9bcecb8e8
commit-date: 2024-02-01
host: x86_64-unknown-linux-gnu
release: 1.77.0-nightly
LLVM version: 17.0.6

Error output

error: internal compiler error: src/librustdoc/clean/auto_trait.rs:745:18: unexpected region: RePlaceholder(!1_BoundRegion { var: 0, kind: BrAnon })

thread 'rustc' panicked at /rustc/bf3c6c5bed498f41ad815641319a1ad9bcecb8e8/compiler/rustc_errors/src/lib.rs:932:30:
Box<dyn Any>
stack backtrace:
   0:     0x75078af8cd16 - std::backtrace_rs::backtrace::libunwind::trace::he544685250360e22
                               at /rustc/bf3c6c5bed498f41ad815641319a1ad9bcecb8e8/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
   1:     0x75078af8cd16 - std::backtrace_rs::backtrace::trace_unsynchronized::h664adef12633380a
                               at /rustc/bf3c6c5bed498f41ad815641319a1ad9bcecb8e8/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x75078af8cd16 - std::sys_common::backtrace::_print_fmt::hba7ee045aeee07b0
                               at /rustc/bf3c6c5bed498f41ad815641319a1ad9bcecb8e8/library/std/src/sys_common/backtrace.rs:68:5
   3:     0x75078af8cd16 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hc80b7ff177a688f2
                               at /rustc/bf3c6c5bed498f41ad815641319a1ad9bcecb8e8/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x75078afdf770 - core::fmt::rt::Argument::fmt::h605309ab4829b6b5
                               at /rustc/bf3c6c5bed498f41ad815641319a1ad9bcecb8e8/library/core/src/fmt/rt.rs:142:9
   5:     0x75078afdf770 - core::fmt::write::h5f24f526de99e105
                               at /rustc/bf3c6c5bed498f41ad815641319a1ad9bcecb8e8/library/core/src/fmt/mod.rs:1120:17
   6:     0x75078af8061f - std::io::Write::write_fmt::h711c920f97cd3d8c
                               at /rustc/bf3c6c5bed498f41ad815641319a1ad9bcecb8e8/library/std/src/io/mod.rs:1846:15
   7:     0x75078af8caf4 - std::sys_common::backtrace::_print::ha279702af2871260
                               at /rustc/bf3c6c5bed498f41ad815641319a1ad9bcecb8e8/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x75078af8caf4 - std::sys_common::backtrace::print::hc1f3820f405abdd3
                               at /rustc/bf3c6c5bed498f41ad815641319a1ad9bcecb8e8/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x75078af8f887 - std::panicking::default_hook::{{closure}}::h5058841d19c78172
  10:     0x75078af8f5e9 - std::panicking::default_hook::h60a42497ec033f97
                               at /rustc/bf3c6c5bed498f41ad815641319a1ad9bcecb8e8/library/std/src/panicking.rs:292:9
  11:     0x750787b371fc - std[4337b1e3d1c66af6]::panicking::update_hook::<alloc[6a28242b4f343ab9]::boxed::Box<rustc_driver_impl[e51f6499da6a94b9]::install_ice_hook::{closure#0}>>::{closure#0}
  12:     0x75078af8ffd6 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h437fd8fcb0ff0cea
                               at /rustc/bf3c6c5bed498f41ad815641319a1ad9bcecb8e8/library/alloc/src/boxed.rs:2029:9
  13:     0x75078af8ffd6 - std::panicking::rust_panic_with_hook::h294fbe090fe44fa4
                               at /rustc/bf3c6c5bed498f41ad815641319a1ad9bcecb8e8/library/std/src/panicking.rs:785:13
  14:     0x750787b693b4 - std[4337b1e3d1c66af6]::panicking::begin_panic::<rustc_errors[37e82e04e08bc148]::ExplicitBug>::{closure#0}
  15:     0x750787b65aa6 - std[4337b1e3d1c66af6]::sys_common::backtrace::__rust_end_short_backtrace::<std[4337b1e3d1c66af6]::panicking::begin_panic<rustc_errors[37e82e04e08bc148]::ExplicitBug>::{closure#0}, !>
  16:     0x750787b60d06 - std[4337b1e3d1c66af6]::panicking::begin_panic::<rustc_errors[37e82e04e08bc148]::ExplicitBug>
  17:     0x750787b74591 - <rustc_errors[37e82e04e08bc148]::diagnostic_builder::BugAbort as rustc_errors[37e82e04e08bc148]::diagnostic_builder::EmissionGuarantee>::emit_producing_guarantee
  18:     0x750787f2cbcb - <rustc_errors[37e82e04e08bc148]::DiagCtxt>::bug::<alloc[6a28242b4f343ab9]::string::String>
  19:     0x750787fc3ceb - rustc_middle[9b442554c155189d]::util::bug::opt_span_bug_fmt::<rustc_span[ecf473d7733698d2]::span_encoding::Span>::{closure#0}
  20:     0x750787faca2a - rustc_middle[9b442554c155189d]::ty::context::tls::with_opt::<rustc_middle[9b442554c155189d]::util::bug::opt_span_bug_fmt<rustc_span[ecf473d7733698d2]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  21:     0x750787fac8c8 - rustc_middle[9b442554c155189d]::ty::context::tls::with_context_opt::<rustc_middle[9b442554c155189d]::ty::context::tls::with_opt<rustc_middle[9b442554c155189d]::util::bug::opt_span_bug_fmt<rustc_span[ecf473d7733698d2]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  22:     0x750785f61d40 - rustc_middle[9b442554c155189d]::util::bug::bug_fmt
  23:     0x5aba61135c63 - <rustdoc[3384abbdb6741cf]::clean::auto_trait::RegionReplacer as rustc_type_ir[d836307668432e47]::fold::TypeFolder<rustc_middle[9b442554c155189d]::ty::context::TyCtxt>>::fold_region
  24:     0x5aba61077b2e - <&rustc_middle[9b442554c155189d]::ty::list::List<rustc_middle[9b442554c155189d]::ty::generic_args::GenericArg> as rustc_type_ir[d836307668432e47]::fold::TypeFoldable<rustc_middle[9b442554c155189d]::ty::context::TyCtxt>>::try_fold_with::<rustdoc[3384abbdb6741cf]::clean::auto_trait::RegionReplacer>
  25:     0x5aba61071bcb - <rustc_middle[9b442554c155189d]::ty::Ty as rustc_type_ir[d836307668432e47]::fold::TypeSuperFoldable<rustc_middle[9b442554c155189d]::ty::context::TyCtxt>>::try_super_fold_with::<rustdoc[3384abbdb6741cf]::clean::auto_trait::RegionReplacer>
  26:     0x5aba61077e9e - <&rustc_middle[9b442554c155189d]::ty::list::List<rustc_middle[9b442554c155189d]::ty::generic_args::GenericArg> as rustc_type_ir[d836307668432e47]::fold::TypeFoldable<rustc_middle[9b442554c155189d]::ty::context::TyCtxt>>::try_fold_with::<rustdoc[3384abbdb6741cf]::clean::auto_trait::RegionReplacer>
  27:     0x5aba61130ad5 - <rustdoc[3384abbdb6741cf]::clean::auto_trait::AutoTraitFinder>::param_env_to_generics
  28:     0x5aba60fd2be6 - <rustc_trait_selection[549d5aadac124ff9]::traits::auto_trait::AutoTraitFinder>::find_auto_trait_generics::<rustdoc[3384abbdb6741cf]::clean::types::Generics, <rustdoc[3384abbdb6741cf]::clean::auto_trait::AutoTraitFinder>::generate_for_trait::{closure#0}>
  29:     0x5aba6112fb56 - <rustdoc[3384abbdb6741cf]::clean::auto_trait::AutoTraitFinder>::generate_for_trait
  30:     0x5aba6114e477 - rustdoc[3384abbdb6741cf]::clean::utils::get_auto_trait_and_blanket_impls
  31:     0x5aba612614ae - <rustdoc[3384abbdb6741cf]::passes::collect_trait_impls::SyntheticImplCollector as rustdoc[3384abbdb6741cf]::visit::DocVisitor>::visit_item
  32:     0x5aba6126182a - <rustdoc[3384abbdb6741cf]::passes::collect_trait_impls::SyntheticImplCollector as rustdoc[3384abbdb6741cf]::visit::DocVisitor>::visit_item
  33:     0x5aba6126182a - <rustdoc[3384abbdb6741cf]::passes::collect_trait_impls::SyntheticImplCollector as rustdoc[3384abbdb6741cf]::visit::DocVisitor>::visit_item
  34:     0x5aba6125e225 - rustdoc[3384abbdb6741cf]::passes::collect_trait_impls::collect_trait_impls
  35:     0x5aba611833fe - rustdoc[3384abbdb6741cf]::core::run_global_ctxt
  36:     0x5aba6128edb6 - rustdoc[3384abbdb6741cf]::main_args::{closure#1}::{closure#0}::{closure#0}
  37:     0x5aba6108585e - rustc_interface[e57535df52585ed5]::interface::run_compiler::<core[cc6cd760d986f799]::result::Result<(), rustc_span[ecf473d7733698d2]::ErrorGuaranteed>, rustdoc[3384abbdb6741cf]::main_args::{closure#1}>::{closure#0}
  38:     0x5aba610488d0 - std[4337b1e3d1c66af6]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[e57535df52585ed5]::util::run_in_thread_with_globals<rustc_interface[e57535df52585ed5]::util::run_in_thread_pool_with_globals<rustc_interface[e57535df52585ed5]::interface::run_compiler<core[cc6cd760d986f799]::result::Result<(), rustc_span[ecf473d7733698d2]::ErrorGuaranteed>, rustdoc[3384abbdb6741cf]::main_args::{closure#1}>::{closure#0}, core[cc6cd760d986f799]::result::Result<(), rustc_span[ecf473d7733698d2]::ErrorGuaranteed>>::{closure#0}, core[cc6cd760d986f799]::result::Result<(), rustc_span[ecf473d7733698d2]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[cc6cd760d986f799]::result::Result<(), rustc_span[ecf473d7733698d2]::ErrorGuaranteed>>
  39:     0x5aba61090ade - <<std[4337b1e3d1c66af6]::thread::Builder>::spawn_unchecked_<rustc_interface[e57535df52585ed5]::util::run_in_thread_with_globals<rustc_interface[e57535df52585ed5]::util::run_in_thread_pool_with_globals<rustc_interface[e57535df52585ed5]::interface::run_compiler<core[cc6cd760d986f799]::result::Result<(), rustc_span[ecf473d7733698d2]::ErrorGuaranteed>, rustdoc[3384abbdb6741cf]::main_args::{closure#1}>::{closure#0}, core[cc6cd760d986f799]::result::Result<(), rustc_span[ecf473d7733698d2]::ErrorGuaranteed>>::{closure#0}, core[cc6cd760d986f799]::result::Result<(), rustc_span[ecf473d7733698d2]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[cc6cd760d986f799]::result::Result<(), rustc_span[ecf473d7733698d2]::ErrorGuaranteed>>::{closure#1} as core[cc6cd760d986f799]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  40:     0x75078af99675 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hc4b9a6efba849e51
                               at /rustc/bf3c6c5bed498f41ad815641319a1ad9bcecb8e8/library/alloc/src/boxed.rs:2015:9
  41:     0x75078af99675 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hc525ee5ac423ddcd
                               at /rustc/bf3c6c5bed498f41ad815641319a1ad9bcecb8e8/library/alloc/src/boxed.rs:2015:9
  42:     0x75078af99675 - std::sys::pal::unix::thread::Thread::new::thread_start::h31b81f67226864c0
                               at /rustc/bf3c6c5bed498f41ad815641319a1ad9bcecb8e8/library/std/src/sys/pal/unix/thread.rs:108:17
  43:     0x750784caa9eb - <unknown>
  44:     0x750784d2e8ac - <unknown>
  45:                0x0 - <unknown>

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: please attach the file at `/home/sherlock/git/compio_compat/rustc-ice-2024-02-03T11_08_13-130160.txt` to your bug report

note: compiler flags: --crate-type lib

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

query stack during panic:
end of query stack
error: could not document `compio_compat`

Caused by:
  process didn't exit successfully: `/home/sherlock/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rustdoc --edition=2021 --crate-type lib --crate-name compio_compat src/lib.rs -o /home/sherlock/git/compio_compat/target/doc --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=150 -C metadata=82bf5ac2095ab40f -L dependency=/home/sherlock/git/compio_compat/target/debug/deps --extern compio_buf=/home/sherlock/git/compio_compat/target/debug/deps/libcompio_buf-3f6a7492d880a9a6.rmeta --extern compio_io=/home/sherlock/git/compio_compat/target/debug/deps/libcompio_io-6ba0a1a4d4aab3c6.rmeta --extern futures_util=/home/sherlock/git/compio_compat/target/debug/deps/libfutures_util-9f338ae92a96bae3.rmeta --crate-version 0.1.0` (exit status: 101)

rustc-ice-2024-02-03T11_08_13-130160.txt

Backtrace

 Documenting compio_compat v0.1.0 (/home/sherlock/git/compio_compat)
error: internal compiler error: src/librustdoc/clean/auto_trait.rs:745:18: unexpected region: RePlaceholder(!1_BoundRegion { var: 0, kind: BrAnon })

thread 'rustc' panicked at /rustc/bf3c6c5bed498f41ad815641319a1ad9bcecb8e8/compiler/rustc_errors/src/lib.rs:932:30:
Box<dyn Any>
stack backtrace:
   0: std::panicking::begin_panic::<rustc_errors::ExplicitBug>
   1: <rustc_errors::diagnostic_builder::BugAbort as rustc_errors::diagnostic_builder::EmissionGuarantee>::emit_producing_guarantee
   2: <rustc_errors::DiagCtxt>::bug::<alloc::string::String>
   3: rustc_middle::util::bug::opt_span_bug_fmt::<rustc_span::span_encoding::Span>::{closure#0}
   4: rustc_middle::ty::context::tls::with_opt::<rustc_middle::util::bug::opt_span_bug_fmt<rustc_span::span_encoding::Span>::{closure#0}, !>::{closure#0}
   5: rustc_middle::ty::context::tls::with_context_opt::<rustc_middle::ty::context::tls::with_opt<rustc_middle::util::bug::opt_span_bug_fmt<rustc_span::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
   6: rustc_middle::util::bug::bug_fmt
   7: <rustdoc::clean::auto_trait::RegionReplacer as rustc_type_ir::fold::TypeFolder<rustc_middle::ty::context::TyCtxt>>::fold_region
   8: <&rustc_middle::ty::list::List<rustc_middle::ty::generic_args::GenericArg> as rustc_type_ir::fold::TypeFoldable<rustc_middle::ty::context::TyCtxt>>::try_fold_with::<rustdoc::clean::auto_trait::RegionReplacer>
   9: <rustc_middle::ty::Ty as rustc_type_ir::fold::TypeSuperFoldable<rustc_middle::ty::context::TyCtxt>>::try_super_fold_with::<rustdoc::clean::auto_trait::RegionReplacer>
  10: <&rustc_middle::ty::list::List<rustc_middle::ty::generic_args::GenericArg> as rustc_type_ir::fold::TypeFoldable<rustc_middle::ty::context::TyCtxt>>::try_fold_with::<rustdoc::clean::auto_trait::RegionReplacer>
  11: <rustdoc::clean::auto_trait::AutoTraitFinder>::param_env_to_generics
  12: <rustc_trait_selection::traits::auto_trait::AutoTraitFinder>::find_auto_trait_generics::<rustdoc::clean::types::Generics, <rustdoc::clean::auto_trait::AutoTraitFinder>::generate_for_trait::{closure#0}>
  13: <rustdoc::clean::auto_trait::AutoTraitFinder>::generate_for_trait
  14: rustdoc::clean::utils::get_auto_trait_and_blanket_impls
  15: <rustdoc::passes::collect_trait_impls::SyntheticImplCollector as rustdoc::visit::DocVisitor>::visit_item
  16: <rustdoc::passes::collect_trait_impls::SyntheticImplCollector as rustdoc::visit::DocVisitor>::visit_item
  17: <rustdoc::passes::collect_trait_impls::SyntheticImplCollector as rustdoc::visit::DocVisitor>::visit_item
  18: rustdoc::passes::collect_trait_impls::collect_trait_impls
  19: rustdoc::core::run_global_ctxt
  20: rustdoc::main_args::{closure#1}::{closure#0}::{closure#0}
  21: rustc_interface::interface::run_compiler::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustdoc::main_args::{closure#1}>::{closure#0}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

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: please attach the file at `/home/sherlock/git/compio_compat/rustc-ice-2024-02-03T11_11_10-133512.txt` to your bug report

note: compiler flags: --crate-type lib

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

query stack during panic:
end of query stack
error: could not document `compio_compat`

Caused by:
  process didn't exit successfully: `/home/sherlock/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rustdoc --edition=2021 --crate-type lib --crate-name compio_compat src/lib.rs -o /home/sherlock/git/compio_compat/target/doc --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=150 -C metadata=82bf5ac2095ab40f -L dependency=/home/sherlock/git/compio_compat/target/debug/deps --extern compio_buf=/home/sherlock/git/compio_compat/target/debug/deps/libcompio_buf-3f6a7492d880a9a6.rmeta --extern compio_io=/home/sherlock/git/compio_compat/target/debug/deps/libcompio_io-6ba0a1a4d4aab3c6.rmeta --extern futures_util=/home/sherlock/git/compio_compat/target/debug/deps/libfutures_util-9f338ae92a96bae3.rmeta --crate-version 0.1.0` (exit status: 101)

@Sherlock-Holo Sherlock-Holo 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 Feb 3, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Feb 3, 2024
@fmease fmease added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. A-lifetimes Area: lifetime related A-synthetic-impls Area: Synthetic impls, used by rustdoc to document auto traits and traits with blanket impls A-auto-traits Area: auto traits (`auto trait Send`) E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Feb 3, 2024
@Luk-ESC
Copy link
Contributor

Luk-ESC commented Feb 12, 2024

Minimized:

#![feature(type_alias_impl_trait)]
use std::future::Future;

type Fut<Io: IoAsyncRead> = impl Future;

pub struct CompatRead<Io: IoAsyncRead> {
    fut: Fut<Io>,
}

impl<Io: IoAsyncRead> CompatRead<Io> {
    fn poll_fill_buf(self, io: Io) {
        let _: Fut<Io> = async move { io.read().await };
    }
}


trait IoAsyncRead {
    async fn read(&self);
}

Note that a different ICE can be triggered with a few changes:

#![feature(type_alias_impl_trait)]
use std::future::Future;

type Fut = impl Future;

pub struct CompatRead {
    fut: Fut,
}
New Backtrace
thread 'rustc' panicked at /rustc/1a648b397dedc98ada3dd3360f6d661ec2436c56/compiler/rustc_trait_selection/src/traits/auto_trait.rs:178:13:
Unable to fulfill trait DefId(2:3029 ~ core[8e56]::marker::Freeze) for 'CompatRead': [FulfillmentError(Obligation(predicate=Binder { value: TraitPredicate(<{type error} as std::marker::Freeze>, polarity:Positive), bound_vars: [] }, depth=2),Ambiguity)]
stack backtrace:
 0:     0x713e310c02fe - std::backtrace_rs::backtrace::libunwind::trace::hfff812496cb2354e
                             at /rustc/1a648b397dedc98ada3dd3360f6d661ec2436c56/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
 1:     0x713e310c02fe - std::backtrace_rs::backtrace::trace_unsynchronized::h06db600873ee163d
                             at /rustc/1a648b397dedc98ada3dd3360f6d661ec2436c56/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
 2:     0x713e310c02fe - std::backtrace::Backtrace::create::hbb2edd00479d55d5
                             at /rustc/1a648b397dedc98ada3dd3360f6d661ec2436c56/library/std/src/backtrace.rs:331:13
 3:     0x713e310c0240 - std::backtrace::Backtrace::force_capture::h0633e9373bbbc7ea
                             at /rustc/1a648b397dedc98ada3dd3360f6d661ec2436c56/library/std/src/backtrace.rs:312:9
 4:     0x713e2dd55380 - std[673c07b0c8518b8]::panicking::update_hook::<alloc[2c6c21add906cb03]::boxed::Box<rustc_driver_impl[c60de66b38787e5]::install_ice_hook::{closure#0}>>::{closure#0}
 5:     0x713e310dc736 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hc543a528b9bc2dd2
                             at /rustc/1a648b397dedc98ada3dd3360f6d661ec2436c56/library/alloc/src/boxed.rs:2030:9
 6:     0x713e310dc736 - std::panicking::rust_panic_with_hook::haac9f65a4111ce33
                             at /rustc/1a648b397dedc98ada3dd3360f6d661ec2436c56/library/std/src/panicking.rs:785:13
 7:     0x713e310dc482 - std::panicking::begin_panic_handler::{{closure}}::h6a452ac7fecf7288
                             at /rustc/1a648b397dedc98ada3dd3360f6d661ec2436c56/library/std/src/panicking.rs:659:13
 8:     0x713e310d9916 - std::sys_common::backtrace::__rust_end_short_backtrace::ha4c176c669fc3286
                             at /rustc/1a648b397dedc98ada3dd3360f6d661ec2436c56/library/std/src/sys_common/backtrace.rs:171:18
 9:     0x713e310dc1d4 - rust_begin_unwind
                             at /rustc/1a648b397dedc98ada3dd3360f6d661ec2436c56/library/std/src/panicking.rs:647:5
10:     0x713e311286e5 - core::panicking::panic_fmt::hfae197985af26789
                             at /rustc/1a648b397dedc98ada3dd3360f6d661ec2436c56/library/core/src/panicking.rs:72:14
11:     0x5cd0c05cf953 - <rustc_trait_selection[74e74ff542f4a57a]::traits::auto_trait::AutoTraitFinder>::find_auto_trait_generics::<rustdoc[ea5f4756bf6af5b9]::clean::types::Generics, <rustdoc[ea5f4756bf6af5b9]::clean::auto_trait::AutoTraitFinder>::generate_for_trait::{closure#0}>
12:     0x5cd0c072e836 - <rustdoc[ea5f4756bf6af5b9]::clean::auto_trait::AutoTraitFinder>::generate_for_trait
13:     0x5cd0c074d9b7 - rustdoc[ea5f4756bf6af5b9]::clean::utils::get_auto_trait_and_blanket_impls
14:     0x5cd0c085fb51 - <rustdoc[ea5f4756bf6af5b9]::passes::collect_trait_impls::SyntheticImplCollector as rustdoc[ea5f4756bf6af5b9]::visit::DocVisitor>::visit_item
15:     0x5cd0c085feaa - <rustdoc[ea5f4756bf6af5b9]::passes::collect_trait_impls::SyntheticImplCollector as rustdoc[ea5f4756bf6af5b9]::visit::DocVisitor>::visit_item
16:     0x5cd0c085c915 - rustdoc[ea5f4756bf6af5b9]::passes::collect_trait_impls::collect_trait_impls
17:     0x5cd0c0781ca0 - rustdoc[ea5f4756bf6af5b9]::core::run_global_ctxt
18:     0x5cd0c088d840 - rustdoc[ea5f4756bf6af5b9]::main_args::{closure#1}::{closure#0}::{closure#0}
19:     0x5cd0c0684490 - rustc_interface[9911b9828ae39d39]::interface::run_compiler::<core[8e561eb1b9dc85d8]::result::Result<(), rustc_span[81dd5176fffc21b7]::ErrorGuaranteed>, rustdoc[ea5f4756bf6af5b9]::main_args::{closure#1}>::{closure#0}
20:     0x5cd0c06566f0 - std[673c07b0c8518b8]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[9911b9828ae39d39]::util::run_in_thread_with_globals<rustc_interface[9911b9828ae39d39]::util::run_in_thread_pool_with_globals<rustc_interface[9911b9828ae39d39]::interface::run_compiler<core[8e561eb1b9dc85d8]::result::Result<(), rustc_span[81dd5176fffc21b7]::ErrorGuaranteed>, rustdoc[ea5f4756bf6af5b9]::main_args::{closure#1}>::{closure#0}, core[8e561eb1b9dc85d8]::result::Result<(), rustc_span[81dd5176fffc21b7]::ErrorGuaranteed>>::{closure#0}, core[8e561eb1b9dc85d8]::result::Result<(), rustc_span[81dd5176fffc21b7]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[8e561eb1b9dc85d8]::result::Result<(), rustc_span[81dd5176fffc21b7]::ErrorGuaranteed>>
21:     0x5cd0c068fa06 - <<std[673c07b0c8518b8]::thread::Builder>::spawn_unchecked_<rustc_interface[9911b9828ae39d39]::util::run_in_thread_with_globals<rustc_interface[9911b9828ae39d39]::util::run_in_thread_pool_with_globals<rustc_interface[9911b9828ae39d39]::interface::run_compiler<core[8e561eb1b9dc85d8]::result::Result<(), rustc_span[81dd5176fffc21b7]::ErrorGuaranteed>, rustdoc[ea5f4756bf6af5b9]::main_args::{closure#1}>::{closure#0}, core[8e561eb1b9dc85d8]::result::Result<(), rustc_span[81dd5176fffc21b7]::ErrorGuaranteed>>::{closure#0}, core[8e561eb1b9dc85d8]::result::Result<(), rustc_span[81dd5176fffc21b7]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[8e561eb1b9dc85d8]::result::Result<(), rustc_span[81dd5176fffc21b7]::ErrorGuaranteed>>::{closure#1} as core[8e561eb1b9dc85d8]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
22:     0x713e310e5925 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h882bc548fde6b0fb
                             at /rustc/1a648b397dedc98ada3dd3360f6d661ec2436c56/library/alloc/src/boxed.rs:2016:9
23:     0x713e310e5925 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h95e2a93069d2a4eb
                             at /rustc/1a648b397dedc98ada3dd3360f6d661ec2436c56/library/alloc/src/boxed.rs:2016:9
24:     0x713e310e5925 - std::sys::pal::unix::thread::Thread::new::thread_start::hbe34808929695de9
                             at /rustc/1a648b397dedc98ada3dd3360f6d661ec2436c56/library/std/src/sys/pal/unix/thread.rs:108:17
25:     0x713e2aea955a - <unknown>
26:     0x713e2af26a3c - <unknown>
27:                0x0 - <unknown>

Not sure how related they are.

@jieyouxu jieyouxu added F-type_alias_impl_trait `#[feature(type_alias_impl_trait)]` S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue and removed E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example labels Feb 28, 2024
@fmease fmease changed the title ICE when run cargo doc --open rustdoc: ICE: synthetic auto trait impls: unexpected region: RePlaceholder[…] involving TAIT Mar 31, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Apr 2, 2024
…uillaumeGomez

rustdoc: synthetic auto trait impls: accept unresolved region vars for now

rust-lang#123348 (comment):

> Right, [in rust-lang#123340] I've intentionally changed a `vid_map.get(vid).unwrap_or(r)` to a `vid_map[vid]` making rustdoc panic if `rustc::AutoTraitFinder` returns a region inference variable that cannot be resolved because that is really fishy.  I can change it back with a `FIXME: investigate` […]. [O]nce I [fully] understand [the arcane] `rustc::AutoTraitFinder` [I] can fix the underlying issue if there's one.
>
> `rustc::AutoTraitFinder` can also return placeholder regions `RePlaceholder` which doesn't seem right either and which makes rustdoc ICE, too (we have a GitHub issue for that already[, namely rust-lang#120606]).

Fixes rust-lang#123370.
Fixes rust-lang#112242.

r? `@GuillaumeGomez`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Apr 2, 2024
…uillaumeGomez

rustdoc: synthetic auto trait impls: accept unresolved region vars for now

rust-lang#123348 (comment):

> Right, [in rust-lang#123340] I've intentionally changed a `vid_map.get(vid).unwrap_or(r)` to a `vid_map[vid]` making rustdoc panic if `rustc::AutoTraitFinder` returns a region inference variable that cannot be resolved because that is really fishy.  I can change it back with a `FIXME: investigate` […]. [O]nce I [fully] understand [the arcane] `rustc::AutoTraitFinder` [I] can fix the underlying issue if there's one.
>
> `rustc::AutoTraitFinder` can also return placeholder regions `RePlaceholder` which doesn't seem right either and which makes rustdoc ICE, too (we have a GitHub issue for that already[, namely rust-lang#120606]).

Fixes rust-lang#123370.
Fixes rust-lang#112242.

r? ``@GuillaumeGomez``
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Apr 2, 2024
Rollup merge of rust-lang#123375 - fmease:rustdoc-sati-re-hotfix, r=GuillaumeGomez

rustdoc: synthetic auto trait impls: accept unresolved region vars for now

rust-lang#123348 (comment):

> Right, [in rust-lang#123340] I've intentionally changed a `vid_map.get(vid).unwrap_or(r)` to a `vid_map[vid]` making rustdoc panic if `rustc::AutoTraitFinder` returns a region inference variable that cannot be resolved because that is really fishy.  I can change it back with a `FIXME: investigate` […]. [O]nce I [fully] understand [the arcane] `rustc::AutoTraitFinder` [I] can fix the underlying issue if there's one.
>
> `rustc::AutoTraitFinder` can also return placeholder regions `RePlaceholder` which doesn't seem right either and which makes rustdoc ICE, too (we have a GitHub issue for that already[, namely rust-lang#120606]).

Fixes rust-lang#123370.
Fixes rust-lang#112242.

r? ``@GuillaumeGomez``
@fmease fmease self-assigned this Jun 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-auto-traits Area: auto traits (`auto trait Send`) A-lifetimes Area: lifetime related A-synthetic-impls Area: Synthetic impls, used by rustdoc to document auto traits and traits with blanket impls C-bug Category: This is a bug. F-type_alias_impl_trait `#[feature(type_alias_impl_trait)]` I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ S-has-mcve Status: A Minimal Complete and Verifiable Example has been found for this issue T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. 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

5 participants