Repository: rust
Issue: Failed to normalize Alias(Opaque, AliasTy { args: [], def_id: DefId(0:3619 ~ zino_model[cffa]::user::{impl#1}::after_create_table::{opaque#0}) }), maybe try to call `try_normalize_erasing_regions` instead
Labels: I-ICE,T-compiler,C-bug

<!--
Thank you for finding an Internal Compiler Error! 🧊  If possible, try to provide
a minimal verifiable example. You can read "Rust Bug Minimization Patterns" for
how to create smaller examples.
http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/
-->

### Code

The error occurs when I try to add the [`after_create_table`](https://docs.rs/zino-core/0.13.1/zino_core/model/trait.ModelHooks.html#method.after_create_table) method for [`zino-model::User`](https://docs.rs/zino-model/latest/zino_model/user/struct.User.html):

```Rust
impl ModelHooks for User {
    #[cfg(feature = "maintainer-id")]
    type Extension = UserSession<Uuid, String>;

    async fn after_create_table() -> Result<(), Error> {
        let mut query = Self::default_list_query();
        query.add_filter("roles", "admin");
        if Self::count(&query).await? == 0 {
            let mut data = Map::new();
            data.upsert("name", "Administrator");
            data.upsert("roles", "admin");
            data.upsert("account", "admin");
            data.upsert("password", "admin");

            let mut administrator = Self::new();
            let validation = administrator.read_map(&data);
            if validation.is_success() {
                administrator.insert().await?;
            }
        }
        Ok(())
    }

    #[cfg(feature = "maintainer-id")]
    #[inline]
    async fn after_extract(&mut self, session: Self::Extension) -> Result<(), Error> {
        self.maintainer_id = Some(*session.user_id());
        Ok(())
    }

    #[cfg(feature = "maintainer-id")]
    #[inline]
    async fn before_validation(
        data: &mut Map,
        extension: Option<&Self::Extension>,
    ) -> Result<(), Error> {
        if let Some(session) = extension {
            data.upsert("maintainer_id", session.user_id().to_string());
        }
        Ok(())
    }
}
```


### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

`rustc --version --verbose`:
```
rustc 1.74.0-nightly (ca2b74f1a 2023-09-14)
binary: rustc
commit-hash: ca2b74f1ae5075d62e223c0a91574a1fc3f51c7c
commit-date: 2023-09-14
host: x86_64-pc-windows-msvc
release: 1.74.0-nightly
LLVM version: 17.0.0

```

### Error output

```
error: internal compiler error: compiler\rustc_middle\src\ty\normalize_erasing_regions.rs:195:90: Failed to normalize Alias(Opaque, AliasTy { args: [], def_id: DefId(0:3619 ~ zino_model[cffa]::user::{impl#1}::after_create_table::{opaque#0}) }), maybe try to call `try_normalize_erasing_regions` instead

thread 'rustc' panicked at /rustc/ca2b74f1ae5075d62e223c0a91574a1fc3f51c7c\compiler\rustc_errors\src\lib.rs:1651:9:
Box<dyn Any>
stack backtrace:
   0:     0x7ff93fb464da - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h7d96bb47b8259b19
   1:     0x7ff93fb7b27b - core::fmt::write::h391d4f99a7c9ba61
   2:     0x7ff93fb3bda1 - <std::io::IoSliceMut as core::fmt::Debug>::fmt::h825b775f4681ab30
   3:     0x7ff93fb4625a - std::sys_common::backtrace::lock::h7c90b1b69e137e00
   4:     0x7ff93fb49b13 - std::panicking::panic_hook_with_disk_dump::h0b73811722203766
   5:     0x7ff93fb496ab - std::panicking::panic_hook_with_disk_dump::h0b73811722203766
   6:     0x7ff8d916dac0 - rustc_driver_impl[f4795a6955707fde]::ice_path
   7:     0x7ff93fb4a4eb - std::panicking::rust_panic_with_hook::hddc10c471e545221
   8:     0x7ff8da334e48 - <rustc_middle[d8286ac0ea2cb69]::dep_graph::dep_node::DepKind as core[a2a52c79d6995320]::fmt::Debug>::fmt
   9:     0x7ff8da334af9 - <rustc_middle[d8286ac0ea2cb69]::dep_graph::dep_node::DepKind as core[a2a52c79d6995320]::fmt::Debug>::fmt
  10:     0x7ff8da332079 - <rustc_middle[d8286ac0ea2cb69]::dep_graph::dep_node::DepKind as core[a2a52c79d6995320]::fmt::Debug>::fmt
  11:     0x7ff8da265b50 - <rustc_middle[d8286ac0ea2cb69]::traits::solve::Response as core[a2a52c79d6995320]::fmt::Debug>::fmt
  12:     0x7ff8da2658bc - <rustc_middle[d8286ac0ea2cb69]::traits::solve::Response as core[a2a52c79d6995320]::fmt::Debug>::fmt
  13:     0x7ff8da2a84ed - rustc_middle[d8286ac0ea2cb69]::util::bug::bug_fmt
  14:     0x7ff8da2a833d - <rustc_middle[d8286ac0ea2cb69]::ty::error::TypeError>::must_include_note
  15:     0x7ff8da2a830a - <rustc_middle[d8286ac0ea2cb69]::ty::error::TypeError>::must_include_note
  16:     0x7ff8da2a83e2 - rustc_middle[d8286ac0ea2cb69]::util::bug::bug_fmt
  17:     0x7ff8d905fd42 - <rustc_middle[d8286ac0ea2cb69]::ty::normalize_erasing_regions::NormalizeAfterErasingRegionsFolder as rustc_type_ir[959bd79a24215897]::fold::TypeFolder<rustc_middle[d8286ac0ea2cb69]::ty::context::TyCtxt>>::fold_ty
  18:     0x7ff8d82a4324 - <windows[1221273d91470df]::Windows::Win32::Foundation::POINTL as core[a2a52c79d6995320]::cmp::PartialEq>::eq
  19:     0x7ff8d8299742 - <windows[1221273d91470df]::Windows::Win32::Foundation::POINTL as core[a2a52c79d6995320]::cmp::PartialEq>::eq
  20:     0x7ff8d8297455 - <windows[1221273d91470df]::Windows::Win32::Foundation::POINTL as core[a2a52c79d6995320]::cmp::PartialEq>::eq
  21:     0x7ff8d8ad8076 - rustc_query_impl[aabbd44c70ac20af]::query_callbacks
  22:     0x7ff8d8b621e0 - rustc_query_impl[aabbd44c70ac20af]::query_callbacks
  23:     0x7ff8d8b50b8d - rustc_query_impl[aabbd44c70ac20af]::query_callbacks
  24:     0x7ff8d8231ed3 - <rustc_codegen_llvm[ef69803b704967fe]::context::CodegenCx as rustc_codegen_ssa[e5937b3565eb32e5]::traits::declare::PreDefineMethods>::predefine_fn
  25:     0x7ff8d821f575 - <rustc_codegen_llvm[ef69803b704967fe]::base::ValueIter as core[a2a52c79d6995320]::iter::traits::iterator::Iterator>::next
  26:     0x7ff8d5406a38 - <rustc_codegen_llvm[ef69803b704967fe]::context::CodegenCx as rustc_codegen_ssa[e5937b3565eb32e5]::traits::type_::LayoutTypeMethods>::fn_ptr_backend_type
  27:     0x7ff8d53df32c - <rustc_codegen_llvm[ef69803b704967fe]::builder::Builder as rustc_codegen_ssa[e5937b3565eb32e5]::traits::type_::ArgAbiMethods>::store_fn_arg
  28:     0x7ff8d53cfb16 - <rustc_codegen_llvm[ef69803b704967fe]::llvm_::ffi::debuginfo::DebugEmissionKind>::from_generic
  29:     0x7ff8d53b1e99 - <rustc_codegen_llvm[ef69803b704967fe]::LlvmCodegenBackend as rustc_codegen_ssa[e5937b3565eb32e5]::traits::backend::CodegenBackend>::codegen_crate
  30:     0x7ff8d5372257 - <rustc_interface[46b7751d0774c395]::queries::Linker>::link
  31:     0x7ff8d536aa0a - rustc_interface[46b7751d0774c395]::passes::start_codegen
  32:     0x7ff8d5398ab8 - rustc_interface[46b7751d0774c395]::util::build_output_filenames
  33:     0x7ff8d5370a65 - <rustc_interface[46b7751d0774c395]::queries::Queries>::ongoing_codegen
  34:     0x7ff8d5335fc5 - rustc_driver_impl[f4795a6955707fde]::args::arg_expand_all
  35:     0x7ff8d534d2e4 - <rustc_middle[d8286ac0ea2cb69]::ty::SymbolName as core[a2a52c79d6995320]::fmt::Display>::fmt
  36:     0x7ff8d534ee06 - <rustc_middle[d8286ac0ea2cb69]::ty::SymbolName as core[a2a52c79d6995320]::fmt::Display>::fmt
  37:     0x7ff93fb5db9c - std::sys::windows::thread::Thread::new::h5e1d00b22c07e079
  38:     0x7ff97ebb7344 - BaseThreadInitThunk
  39:     0x7ff97fd426b1 - RtlUserThreadStart

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

warning: the ICE couldn't be written to `D:\git\github\zino\zino-model\rustc-ice-2023-09-21T10:36:52.2345758Z-18056.txt`: 文件名、目录名或卷标语法不正确。 (os error 123)

note: rustc 1.74.0-nightly (ca2b74f1a 2023-09-14) running on x86_64-pc-windows-msvc

note: compiler flags: --crate-type lib -C embed-bitcode=no -C debuginfo=2 -C incremental=[REDACTED]

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [fn_abi_of_instance] computing call ABI of `user::<impl at D:\git\github\zino\zino-model\src\user\mod.rs:171:1: 171:25>::after_create_table`
end of query stack
error: could not compile `zino-model` (lib)
warning: build failed, waiting for other jobs to finish...

```

<!--
Include a backtrace in the code block by setting `RUST_BACKTRACE=1` in your
environment. E.g. `RUST_BACKTRACE=1 cargo build`.
-->
<details><summary><strong>Backtrace</strong></summary>
<p>

```
<backtrace>
```

</p>
</details>