Repository: rust
Issue: [ICE]: Failed to normalize <bump_str::BumpStr<'_> as rkyv::Archive>::Resolver
Labels: I-ICE,T-compiler,C-bug

### Code

```Rust
Code: https://github.com/estuary/rust-ice-rkyv
CI run that shows the error: https://github.com/estuary/rust-ice-rkyv/actions/runs/4027078143/jobs/6922371585
```


### Affected release channels

- [x] Previous Stable
- [X] Current Stable
- [ ] Current Beta
- [ ] Current Nightly

### Rust Version

```Shell
rustc 1.67.0 (fc594f156 2023-01-24)
binary: rustc
commit-hash: fc594f15669680fa70d255faec3ca3fb507c3405
commit-date: 2023-01-24
host: x86_64-unknown-linux-gnu
release: 1.67.0
LLVM version: 15.0.6
```


### Current error output

```Shell
error: internal compiler error: compiler/rustc_middle/src/ty/normalize_erasing_regions.rs:198:90: Failed to normalize <bump_str::BumpStr<'_> as rkyv::Archive>::Resolver, maybe try to call `try_normalize_erasing_regions` instead
```


### Backtrace

```Shell
thread 'rustc' panicked at 'Box<dyn Any>', /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/compiler/rustc_errors/src/lib.rs:1576:9
stack backtrace:
   0:     0x7f3647a2c6fa - std::backtrace_rs::backtrace::libunwind::trace::h34aec3ef6cd8ad7e
                               at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f3647a2c6fa - std::backtrace_rs::backtrace::trace_unsynchronized::h8035d38698d0f7a8
                               at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f3647a2c6fa - std::sys_common::backtrace::_print_fmt::hff968f6695a1ba22
                               at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7f3647a2c6fa - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h7eea0efe77acf1ec
                               at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f3647a8f25e - core::fmt::write::hc553f17407eb0b48
                               at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/core/src/fmt/mod.rs:1208:17
   5:     0x7f3647a1ca85 - std::io::Write::write_fmt::h62e5f01a089f48c0
                               at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/std/src/io/mod.rs:1682:15
   6:     0x7f3647a2c4c5 - std::sys_common::backtrace::_print::h52d116aff3db4cd1
                               at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7f3647a2c4c5 - std::sys_common::backtrace::print::h9e7d2f98fb7af075
                               at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7f3647a2f20f - std::panicking::default_hook::{{closure}}::hf74999dab2d0a95c
                               at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/std/src/panicking.rs:267:22
   9:     0x7f3647a2ef4b - std::panicking::default_hook::hc11ca7d10c44c42f
                               at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/std/src/panicking.rs:286:9
  10:     0x7f364ad2fc31 - rustc_driver[faf1f11f94aaf6ff]::DEFAULT_HOOK::{closure#0}::{closure#0}
  11:     0x7f3647a2fa4d - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::ha7dbb2d260f78172
                               at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/alloc/src/boxed.rs:2032:9
  12:     0x7f3647a2fa4d - std::panicking::rust_panic_with_hook::hdb4da1ae79c845a5
                               at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/std/src/panicking.rs:692:13
  13:     0x7f364b1de531 - std[3da7f01c8c2aa3e3]::panicking::begin_panic::<rustc_errors[1b8cd632e3edc426]::ExplicitBug>::{closure#0}
  14:     0x7f364b1dac06 - std[3da7f01c8c2aa3e3]::sys_common::backtrace::__rust_end_short_backtrace::<std[3da7f01c8c2aa3e3]::panicking::begin_panic<rustc_errors[1b8cd632e3edc426]::ExplicitBug>::{closure#0}, !>
  15:     0x7f364b1f7916 - std[3da7f01c8c2aa3e3]::panicking::begin_panic::<rustc_errors[1b8cd632e3edc426]::ExplicitBug>
  16:     0x7f364b1bdbb6 - std[3da7f01c8c2aa3e3]::panic::panic_any::<rustc_errors[1b8cd632e3edc426]::ExplicitBug>
  17:     0x7f364b1bc976 - <rustc_errors[1b8cd632e3edc426]::HandlerInner>::bug::<&alloc[7282c0069cd654ea]::string::String>
  18:     0x7f364b1bc5e0 - <rustc_errors[1b8cd632e3edc426]::Handler>::bug::<&alloc[7282c0069cd654ea]::string::String>
  19:     0x7f364b19ad8e - rustc_middle[bcb6873cde329d56]::ty::context::tls::with_context_opt::<rustc_middle[bcb6873cde329d56]::ty::context::tls::with_opt<rustc_middle[bcb6873cde329d56]::util::bug::opt_span_bug_fmt<rustc_span[5737ed96bfbdbd37]::span_encoding::Span>::{closure#0}, ()>::{closure#0}, ()>
  20:     0x7f364b19c1f6 - rustc_middle[bcb6873cde329d56]::util::bug::opt_span_bug_fmt::<rustc_span[5737ed96bfbdbd37]::span_encoding::Span>
  21:     0x7f3648fac943 - rustc_middle[bcb6873cde329d56]::util::bug::bug_fmt
  22:     0x7f3648d7c0db - <rustc_middle[bcb6873cde329d56]::ty::normalize_erasing_regions::NormalizeAfterErasingRegionsFolder as rustc_middle[bcb6873cde329d56]::ty::fold::TypeFolder>::fold_ty
  23:     0x7f3648eef9cd - <rustc_mir_dataflow[9900eeec060b2470]::elaborate_drops::DropCtxt<rustc_mir_transform[be636f278bbe35f]::elaborate_drops::Elaborator>>::elaborate_drop
  24:     0x7f3649db079a - <rustc_mir_transform[be636f278bbe35f]::elaborate_drops::ElaborateDrops as rustc_middle[bcb6873cde329d56]::mir::MirPass>::run_pass
  25:     0x7f364974dc83 - rustc_mir_transform[be636f278bbe35f]::run_analysis_to_runtime_passes
  26:     0x7f364974c9f0 - rustc_mir_transform[be636f278bbe35f]::mir_drops_elaborated_and_const_checked
  27:     0x7f3649aad31e - <rustc_query_system[daa376e8a1534a67]::dep_graph::graph::DepGraph<rustc_middle[bcb6873cde329d56]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[bcb6873cde329d56]::ty::context::TyCtxt, rustc_middle[bcb6873cde329d56]::ty::WithOptConstParam<rustc_span[5737ed96bfbdbd37]::def_id::LocalDefId>, &rustc_data_structures[7e2dc299a6484f3b]::steal::Steal<rustc_middle[bcb6873cde329d56]::mir::Body>>
  28:     0x7f3649aabb81 - rustc_query_system[daa376e8a1534a67]::query::plumbing::try_execute_query::<rustc_query_impl[7ca4c504d4b53a14]::plumbing::QueryCtxt, rustc_query_system[daa376e8a1534a67]::query::caches::DefaultCache<rustc_middle[bcb6873cde329d56]::ty::WithOptConstParam<rustc_span[5737ed96bfbdbd37]::def_id::LocalDefId>, &rustc_data_structures[7e2dc299a6484f3b]::steal::Steal<rustc_middle[bcb6873cde329d56]::mir::Body>>>
  29:     0x7f364967486f - rustc_mir_transform[be636f278bbe35f]::optimized_mir
  30:     0x7f36496762eb - <rustc_query_system[daa376e8a1534a67]::dep_graph::graph::DepGraph<rustc_middle[bcb6873cde329d56]::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle[bcb6873cde329d56]::ty::context::TyCtxt, rustc_span[5737ed96bfbdbd37]::def_id::DefId, &rustc_middle[bcb6873cde329d56]::mir::Body>
  31:     0x7f3649670419 - rustc_query_system[daa376e8a1534a67]::query::plumbing::try_execute_query::<rustc_query_impl[7ca4c504d4b53a14]::plumbing::QueryCtxt, rustc_query_system[daa376e8a1534a67]::query::caches::DefaultCache<rustc_span[5737ed96bfbdbd37]::def_id::DefId, &rustc_middle[bcb6873cde329d56]::mir::Body>>
  32:     0x7f3649f6ebbb - <rustc_metadata[f8c4ab1bde6ef14]::rmeta::encoder::EncodeContext>::encode_crate_root
  33:     0x7f3649f039d8 - rustc_metadata[f8c4ab1bde6ef14]::rmeta::encoder::encode_metadata_impl
  34:     0x7f3649effc9e - rustc_data_structures[7e2dc299a6484f3b]::sync::join::<rustc_metadata[f8c4ab1bde6ef14]::rmeta::encoder::encode_metadata::{closure#0}, rustc_metadata[f8c4ab1bde6ef14]::rmeta::encoder::encode_metadata::{closure#1}, (), ()>
  35:     0x7f3649eff9a1 - rustc_metadata[f8c4ab1bde6ef14]::rmeta::encoder::encode_metadata
  36:     0x7f3649efec06 - rustc_metadata[f8c4ab1bde6ef14]::fs::encode_and_write_metadata
  37:     0x7f3649eec67e - rustc_interface[1d25fa3620f328b6]::passes::start_codegen
  38:     0x7f3649eea3b6 - <rustc_interface[1d25fa3620f328b6]::passes::QueryContext>::enter::<<rustc_interface[1d25fa3620f328b6]::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core[e12cfea94acfcb96]::result::Result<alloc[7282c0069cd654ea]::boxed::Box<dyn core[e12cfea94acfcb96]::any::Any>, rustc_errors[1b8cd632e3edc426]::ErrorGuaranteed>>
  39:     0x7f3649ee788a - <rustc_interface[1d25fa3620f328b6]::queries::Queries>::ongoing_codegen
  40:     0x7f3649ee6f57 - <rustc_interface[1d25fa3620f328b6]::interface::Compiler>::enter::<rustc_driver[faf1f11f94aaf6ff]::run_compiler::{closure#1}::{closure#2}, core[e12cfea94acfcb96]::result::Result<core[e12cfea94acfcb96]::option::Option<rustc_interface[1d25fa3620f328b6]::queries::Linker>, rustc_errors[1b8cd632e3edc426]::ErrorGuaranteed>>
  41:     0x7f3649ee1f78 - rustc_span[5737ed96bfbdbd37]::with_source_map::<core[e12cfea94acfcb96]::result::Result<(), rustc_errors[1b8cd632e3edc426]::ErrorGuaranteed>, rustc_interface[1d25fa3620f328b6]::interface::run_compiler<core[e12cfea94acfcb96]::result::Result<(), rustc_errors[1b8cd632e3edc426]::ErrorGuaranteed>, rustc_driver[faf1f11f94aaf6ff]::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
  42:     0x7f3649ee1a65 - <scoped_tls[85a67c9db469d989]::ScopedKey<rustc_span[5737ed96bfbdbd37]::SessionGlobals>>::set::<rustc_interface[1d25fa3620f328b6]::interface::run_compiler<core[e12cfea94acfcb96]::result::Result<(), rustc_errors[1b8cd632e3edc426]::ErrorGuaranteed>, rustc_driver[faf1f11f94aaf6ff]::run_compiler::{closure#1}>::{closure#0}, core[e12cfea94acfcb96]::result::Result<(), rustc_errors[1b8cd632e3edc426]::ErrorGuaranteed>>
  43:     0x7f3649ee1052 - std[3da7f01c8c2aa3e3]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[1d25fa3620f328b6]::util::run_in_thread_pool_with_globals<rustc_interface[1d25fa3620f328b6]::interface::run_compiler<core[e12cfea94acfcb96]::result::Result<(), rustc_errors[1b8cd632e3edc426]::ErrorGuaranteed>, rustc_driver[faf1f11f94aaf6ff]::run_compiler::{closure#1}>::{closure#0}, core[e12cfea94acfcb96]::result::Result<(), rustc_errors[1b8cd632e3edc426]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[e12cfea94acfcb96]::result::Result<(), rustc_errors[1b8cd632e3edc426]::ErrorGuaranteed>>
  44:     0x7f364a5e5bea - <<std[3da7f01c8c2aa3e3]::thread::Builder>::spawn_unchecked_<rustc_interface[1d25fa3620f328b6]::util::run_in_thread_pool_with_globals<rustc_interface[1d25fa3620f328b6]::interface::run_compiler<core[e12cfea94acfcb96]::result::Result<(), rustc_errors[1b8cd632e3edc426]::ErrorGuaranteed>, rustc_driver[faf1f11f94aaf6ff]::run_compiler::{closure#1}>::{closure#0}, core[e12cfea94acfcb96]::result::Result<(), rustc_errors[1b8cd632e3edc426]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[e12cfea94acfcb96]::result::Result<(), rustc_errors[1b8cd632e3edc426]::ErrorGuaranteed>>::{closure#1} as core[e12cfea94acfcb96]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  45:     0x7f3647a39803 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::ha93239d92e7b610d
                               at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/alloc/src/boxed.rs:2000:9
  46:     0x7f3647a39803 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hebda57b0236de612
                               at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/alloc/src/boxed.rs:2000:9
  47:     0x7f3647a39803 - std::sys::unix::thread::Thread::new::thread_start::h1541b4390bbc26ca
                               at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library/std/src/sys/unix/thread.rs:108:17
  48:     0x7f36478f3609 - start_thread
  49:     0x7f3647816133 - clone
  50:                0x0 - <unknown>

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.67.0 (fc594f156 2023-01-24) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -C debuginfo=0 -C incremental=[REDACTED] -C link-arg=-fuse-ld=lld

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [mir_drops_elaborated_and_const_checked] elaborating drops for `heap::_::<impl at src/heap.rs:3:17: 3:30>::resolve`
#1 [optimized_mir] optimizing MIR for `heap::_::<impl at src/heap.rs:3:17: 3:30>::resolve`
end of query stack
```


### Anything else?

It happens on 1.66.1 as well: https://github.com/estuary/rust-ice-rkyv/actions/runs/4027078143/jobs/6922371756

and 1.65: https://github.com/estuary/rust-ice-rkyv/actions/runs/4027187247/jobs/6922608688