diff --git a/compiler/rustc_feature/src/builtin_attrs.rs b/compiler/rustc_feature/src/builtin_attrs.rs index a183cfd8776a3..c06ce940c5270 100644 --- a/compiler/rustc_feature/src/builtin_attrs.rs +++ b/compiler/rustc_feature/src/builtin_attrs.rs @@ -801,6 +801,11 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[ rustc_doc_primitive, Normal, template!(NameValueStr: "primitive name"), ErrorFollowing, r#"`rustc_doc_primitive` is a rustc internal attribute"#, ), + rustc_attr!( + rustc_filter_proof_tree_dump, Normal, template!(List: "filter1, filter2, ..."), DuplicatesOk, + "the `#[rustc_filter_proof_tree_dump(...)]` attribute is used to filter out proof trees \ + from `-Zdump-solver-proof-tree` output.", + ), // ========================================================================== // Internal attributes, Testing: diff --git a/compiler/rustc_hir_typeck/src/fn_ctxt/mod.rs b/compiler/rustc_hir_typeck/src/fn_ctxt/mod.rs index 1e8af6c6ed733..6a82b00211e45 100644 --- a/compiler/rustc_hir_typeck/src/fn_ctxt/mod.rs +++ b/compiler/rustc_hir_typeck/src/fn_ctxt/mod.rs @@ -302,7 +302,9 @@ impl<'a, 'tcx> AstConv<'tcx> for FnCtxt<'a, 'tcx> { match ty.kind() { ty::Adt(adt_def, _) => Some(*adt_def), // FIXME(#104767): Should we handle bound regions here? - ty::Alias(ty::Projection | ty::Inherent, _) if !ty.has_escaping_bound_vars() => { + ty::Alias(ty::Projection | ty::Inherent | ty::Weak, _) + if !ty.has_escaping_bound_vars() => + { self.normalize(span, ty).ty_adt_def() } _ => None, diff --git a/compiler/rustc_span/src/def_id.rs b/compiler/rustc_span/src/def_id.rs index f65a6aa4fb21a..1ec567bae853f 100644 --- a/compiler/rustc_span/src/def_id.rs +++ b/compiler/rustc_span/src/def_id.rs @@ -388,6 +388,7 @@ pub struct LocalDefId { impl !Ord for LocalDefId {} impl !PartialOrd for LocalDefId {} +/// The [`DefId`] for the local crate root. pub const CRATE_DEF_ID: LocalDefId = LocalDefId { local_def_index: CRATE_DEF_INDEX }; impl Idx for LocalDefId { diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs index 08925761b393c..b84b07b773e98 100644 --- a/compiler/rustc_span/src/symbol.rs +++ b/compiler/rustc_span/src/symbol.rs @@ -1287,6 +1287,7 @@ symbols! { rustc_error, rustc_evaluate_where_clauses, rustc_expected_cgu_reuse, + rustc_filter_proof_tree_dump, rustc_has_incoherent_inherent_impls, rustc_host, rustc_if_this_changed, diff --git a/compiler/rustc_trait_selection/src/solve/eval_ctxt.rs b/compiler/rustc_trait_selection/src/solve/eval_ctxt.rs index 6e0aa08c307bd..5c01eb61b9eba 100644 --- a/compiler/rustc_trait_selection/src/solve/eval_ctxt.rs +++ b/compiler/rustc_trait_selection/src/solve/eval_ctxt.rs @@ -159,9 +159,12 @@ impl<'tcx> InferCtxtEvalExt<'tcx> for InferCtxt<'tcx> { Result<(bool, Certainty, Vec>>), NoSolution>, Option>, ) { - EvalCtxt::enter_root(self, generate_proof_tree, |ecx| { - ecx.evaluate_goal(IsNormalizesToHack::No, goal) - }) + EvalCtxt::enter_root( + self, + generate_proof_tree, + || format!("{:?}", goal.predicate), + |ecx| ecx.evaluate_goal(IsNormalizesToHack::No, goal), + ) } } @@ -176,6 +179,7 @@ impl<'a, 'tcx> EvalCtxt<'a, 'tcx> { fn enter_root( infcx: &InferCtxt<'tcx>, generate_proof_tree: GenerateProofTree, + filter: impl FnOnce() -> String, f: impl FnOnce(&mut EvalCtxt<'_, 'tcx>) -> R, ) -> (R, Option>) { let mode = if infcx.intercrate { SolverMode::Coherence } else { SolverMode::Normal }; @@ -194,7 +198,7 @@ impl<'a, 'tcx> EvalCtxt<'a, 'tcx> { var_values: CanonicalVarValues::dummy(), nested_goals: NestedGoals::new(), tainted: Ok(()), - inspect: ProofTreeBuilder::new_maybe_root(infcx.tcx, generate_proof_tree), + inspect: ProofTreeBuilder::new_maybe_root(infcx.tcx, generate_proof_tree, filter), }; let result = f(&mut ecx); diff --git a/compiler/rustc_trait_selection/src/solve/eval_ctxt/select.rs b/compiler/rustc_trait_selection/src/solve/eval_ctxt/select.rs index a6d118d8cc29d..1d57506b79215 100644 --- a/compiler/rustc_trait_selection/src/solve/eval_ctxt/select.rs +++ b/compiler/rustc_trait_selection/src/solve/eval_ctxt/select.rs @@ -43,46 +43,51 @@ impl<'tcx> InferCtxtSelectExt<'tcx> for InferCtxt<'tcx> { self.instantiate_binder_with_placeholders(obligation.predicate), ); - let (result, _) = EvalCtxt::enter_root(self, GenerateProofTree::Never, |ecx| { - let goal = Goal::new(ecx.tcx(), trait_goal.param_env, trait_goal.predicate); - let (orig_values, canonical_goal) = ecx.canonicalize_goal(goal); - let mut candidates = ecx.compute_canonical_trait_candidates(canonical_goal); - - // pseudo-winnow - if candidates.len() == 0 { - return Err(SelectionError::Unimplemented); - } else if candidates.len() > 1 { - let mut i = 0; - while i < candidates.len() { - let should_drop_i = (0..candidates.len()).filter(|&j| i != j).any(|j| { - candidate_should_be_dropped_in_favor_of( - ecx.tcx(), - &candidates[i], - &candidates[j], - ) - }); - if should_drop_i { - candidates.swap_remove(i); - } else { - i += 1; - if i > 1 { - return Ok(None); + let (result, _) = EvalCtxt::enter_root( + self, + GenerateProofTree::Never, + || unreachable!("proof trees cannot be generated for selection"), + |ecx| { + let goal = Goal::new(ecx.tcx(), trait_goal.param_env, trait_goal.predicate); + let (orig_values, canonical_goal) = ecx.canonicalize_goal(goal); + let mut candidates = ecx.compute_canonical_trait_candidates(canonical_goal); + + // pseudo-winnow + if candidates.len() == 0 { + return Err(SelectionError::Unimplemented); + } else if candidates.len() > 1 { + let mut i = 0; + while i < candidates.len() { + let should_drop_i = (0..candidates.len()).filter(|&j| i != j).any(|j| { + candidate_should_be_dropped_in_favor_of( + ecx.tcx(), + &candidates[i], + &candidates[j], + ) + }); + if should_drop_i { + candidates.swap_remove(i); + } else { + i += 1; + if i > 1 { + return Ok(None); + } } } } - } - let candidate = candidates.pop().unwrap(); - let (certainty, nested_goals) = ecx - .instantiate_and_apply_query_response( - trait_goal.param_env, - orig_values, - candidate.result, - ) - .map_err(|_| SelectionError::Unimplemented)?; + let candidate = candidates.pop().unwrap(); + let (certainty, nested_goals) = ecx + .instantiate_and_apply_query_response( + trait_goal.param_env, + orig_values, + candidate.result, + ) + .map_err(|_| SelectionError::Unimplemented)?; - Ok(Some((candidate, certainty, nested_goals))) - }); + Ok(Some((candidate, certainty, nested_goals))) + }, + ); let (candidate, certainty, nested_goals) = match result { Ok(Some((candidate, certainty, nested_goals))) => (candidate, certainty, nested_goals), diff --git a/compiler/rustc_trait_selection/src/solve/inspect.rs b/compiler/rustc_trait_selection/src/solve/inspect.rs index cda68396321ce..e4e36c9055d97 100644 --- a/compiler/rustc_trait_selection/src/solve/inspect.rs +++ b/compiler/rustc_trait_selection/src/solve/inspect.rs @@ -5,6 +5,7 @@ use rustc_middle::traits::solve::{ }; use rustc_middle::ty::{self, TyCtxt}; use rustc_session::config::DumpSolverProofTree; +use rustc_span::def_id::CRATE_DEF_ID; use super::eval_ctxt::UseGlobalCache; use super::GenerateProofTree; @@ -199,6 +200,7 @@ impl<'tcx> ProofTreeBuilder<'tcx> { pub fn new_maybe_root( tcx: TyCtxt<'tcx>, generate_proof_tree: GenerateProofTree, + filter: impl FnOnce() -> String, ) -> ProofTreeBuilder<'tcx> { match generate_proof_tree { GenerateProofTree::Never => ProofTreeBuilder::new_noop(), @@ -206,8 +208,45 @@ impl<'tcx> ProofTreeBuilder<'tcx> { let opts = &tcx.sess.opts.unstable_opts; match opts.dump_solver_proof_tree { DumpSolverProofTree::Always => { - let use_cache = opts.dump_solver_proof_tree_use_cache.unwrap_or(true); - ProofTreeBuilder::new_root(UseGlobalCache::from_bool(use_cache)) + let should_generate = if tcx + .get_attrs(CRATE_DEF_ID, rustc_span::sym::rustc_filter_proof_tree_dump) + .next() + .is_some() + { + // dont do the filtering behaviour if there are no attributes anywhere + let goal = filter(); + tcx + .get_attrs(CRATE_DEF_ID, rustc_span::sym::rustc_filter_proof_tree_dump) + .flat_map(|attr| { + let meta = attr.meta_kind().unwrap(); + match meta { + rustc_ast::MetaItemKind::Word + | rustc_ast::MetaItemKind::NameValue(_) => { + bug!("wrong attribute kind for `rustc_filter_proof_tree_dump`") + } + rustc_ast::MetaItemKind::List(nested_meta) => { + nested_meta.into_iter().map(|nested_meta| { + match nested_meta { + rustc_ast::NestedMetaItem::MetaItem(_) => unreachable!("only string literals are supported in `rustc_filter_proof_tree_dump`"), + rustc_ast::NestedMetaItem::Lit(lit) => match lit.kind { + rustc_ast::LitKind::Str(sym, _) => sym, + _ => unreachable!("only string literals are supported in `rustc_filter_proof_tree_dump`"), + }, + } + }) + } + } + }).any(|sym| goal.as_str() == sym.as_str()) + } else { + true + }; + + if should_generate { + let use_cache = opts.dump_solver_proof_tree_use_cache.unwrap_or(true); + ProofTreeBuilder::new_root(UseGlobalCache::from_bool(use_cache)) + } else { + ProofTreeBuilder::new_noop() + } } // `OnError` is handled by reevaluating goals in error // reporting with `GenerateProofTree::Yes`. diff --git a/src/doc/rustc/src/SUMMARY.md b/src/doc/rustc/src/SUMMARY.md index f8af26326a734..537c90e985aa9 100644 --- a/src/doc/rustc/src/SUMMARY.md +++ b/src/doc/rustc/src/SUMMARY.md @@ -36,6 +36,7 @@ - [m68k-unknown-linux-gnu](platform-support/m68k-unknown-linux-gnu.md) - [mips64-openwrt-linux-musl](platform-support/mips64-openwrt-linux-musl.md) - [mipsel-sony-psx](platform-support/mipsel-sony-psx.md) + - [mipsisa\*r6\*-unknown-linux-gnu\*](platform-support/mips-release-6.md) - [nvptx64-nvidia-cuda](platform-support/nvptx64-nvidia-cuda.md) - [riscv32imac-unknown-xous-elf](platform-support/riscv32imac-unknown-xous-elf.md) - [*-pc-windows-gnullvm](platform-support/pc-windows-gnullvm.md) diff --git a/src/doc/rustc/src/platform-support.md b/src/doc/rustc/src/platform-support.md index d2a25e612ec7b..a2cabb7bb5c83 100644 --- a/src/doc/rustc/src/platform-support.md +++ b/src/doc/rustc/src/platform-support.md @@ -277,10 +277,10 @@ target | std | host | notes [`mipsel-sony-psx`](platform-support/mipsel-sony-psx.md) | * | | MIPS (LE) Sony PlayStation 1 (PSX) `mipsel-unknown-linux-uclibc` | ✓ | | MIPS (LE) Linux with uClibc `mipsel-unknown-none` | * | | Bare MIPS (LE) softfloat -`mipsisa32r6-unknown-linux-gnu` | ? | | -`mipsisa32r6el-unknown-linux-gnu` | ? | | -`mipsisa64r6-unknown-linux-gnuabi64` | ? | | -`mipsisa64r6el-unknown-linux-gnuabi64` | ? | | +[`mipsisa32r6-unknown-linux-gnu`](platform-support/mips-release-6.md) | ? | | 32-bit MIPS Release 6 Big Endian +[`mipsisa32r6el-unknown-linux-gnu`](platform-support/mips-release-6.md) | ? | | 32-bit MIPS Release 6 Little Endian +[`mipsisa64r6-unknown-linux-gnuabi64`](platform-support/mips-release-6.md) | ? | | 64-bit MIPS Release 6 Big Endian +[`mipsisa64r6el-unknown-linux-gnuabi64`](platform-support/mips-release-6.md) | ✓ | ✓ | 64-bit MIPS Release 6 Little Endian `msp430-none-elf` | * | | 16-bit MSP430 microcontrollers `powerpc-unknown-linux-gnuspe` | ✓ | | PowerPC SPE Linux `powerpc-unknown-linux-musl` | ? | | @@ -305,7 +305,7 @@ target | std | host | notes `riscv64gc-unknown-freebsd` | | | RISC-V FreeBSD `riscv64gc-unknown-fuchsia` | | | RISC-V Fuchsia `riscv64gc-unknown-linux-musl` | | | RISC-V Linux (kernel 4.20, musl 1.2.0) -[`riscv64gc-unknown-netbsd`](platform-support/netbsd.md) | ✓ | ? | RISC-V NetBSD +[`riscv64gc-unknown-netbsd`](platform-support/netbsd.md) | ✓ | ✓ | RISC-V NetBSD [`riscv64gc-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | OpenBSD/riscv64 `s390x-unknown-linux-musl` | | | S390x Linux (kernel 3.2, MUSL) `sparc-unknown-linux-gnu` | ✓ | | 32-bit SPARC Linux diff --git a/src/doc/rustc/src/platform-support/mips-release-6.md b/src/doc/rustc/src/platform-support/mips-release-6.md new file mode 100644 index 0000000000000..3f1912fc6f951 --- /dev/null +++ b/src/doc/rustc/src/platform-support/mips-release-6.md @@ -0,0 +1,181 @@ +# mipsisa\*r6\*-unknown-linux-gnu\* + +**Tier: 3** + +[MIPS Release 6](https://s3-eu-west-1.amazonaws.com/downloads-mips/documents/MD00083-2B-MIPS64INT-AFP-06.01.pdf), or simply MIPS R6, is the latest iteration of the MIPS instruction set architecture (ISA). + +MIPS R6 is experimental in nature, as there is not yet real hardware. However, Qemu emulation is available and we have two Linux distros maintained for development and evaluation purposes. This documentation describes the Rust support for MIPS R6 targets under `mipsisa*r6*-unknown-linux-gnu*`. + +The target name follow this format: `--`, where `` specifies the CPU family/model, `` specifies the vendor and `` the operating system name. The `` denotes the base ABI (32/n32/64/o64). + +| ABI suffix | Description | +|------------|------------------------------------| +| abi64 | Uses the 64-bit (64) ABI | +| abin32 | Uses the n32 ABI | +| N/A | Uses the (assumed) 32-bit (32) ABI | + +## Target Maintainers + +- [Xuan Chen](https://github.com/chenx97) +- [Walter Ji](https://github.com/709924470) +- [Xinhui Yang](https://github.com/Cyanoxygen) +- [Lain Yang](https://github.com/Fearyncess) + +## Requirements + +### C/C++ Toolchain + +A GNU toolchain for one of the MIPS R6 target is required. [AOSC OS](https://aosc.io/) provides working native and cross-compiling build environments. You may also supply your own a toolchain consisting of recent versions of GCC and Binutils. + +### Target libraries + +A minimum set of libraries is required to perform dynamic linking: + +- GNU glibc +- OpenSSL +- Zlib +- Linux API Headers + +This set of libraries should be installed to make up minimal target sysroot. + +For AOSC OS, You may install such a sysroot with the following commands: + +```sh +cd /tmp + +# linux+api, glibc, and file system structure are included in the toolchain. +sudo apt install gcc+cross-mips64r6el binutils+cross-mips64r6el + +# Download and extract required libraries. +wget https://repo.aosc.io/debs/pool/stable/main/z/zlib_1.2.13-0_mips64r6el.deb -O zlib.deb +wget https://repo.aosc.io/debs/pool/stable/main/o/openssl_1.1.1q-1_mips64r6el.deb -O openssl.deb + +# Extract them to your desired location. +for i in zlib openssl ; do + sudo dpkg-deb -vx $i.deb /var/ab/cross-root/mips64r6el +done + +# Workaround a possible ld bug when using -Wl,-Bdynamic. +sudo sed -i 's|/usr|=/usr|g' /var/ab/cross-root/mips64r6el/usr/lib/libc.so +``` + +For other distros, you may build them manually. + +## Building + +The following procedure outlines the build process for the MIPS64 R6 target with 64-bit (64) ABI (`mipsisa64r6el-unknown-linux-gnuabi64`). + +### Prerequisite: Disable debuginfo + +A LLVM bug makes rustc crash if debug or debug info generation is enabled. You need to edit `config.toml` to disable this: + +```toml +[rust] +debug = false +debug-info-level = 0 +``` + +### Prerequisite: Enable rustix's libc backend + +The crate `rustix` may try to link itself against MIPS R2 assembly, resulting in linkage error. To avoid this, you may force `rustix` to use its fallback `libc` backend by setting relevant `RUSTFLAGS`: + +```sh +export RUSTFLAGS="--cfg rustix_use_libc" +``` + +This will trigger warnings during build, as `-D warnings` is enabled by default. Disable `-D warnings` by editing `config.toml` to append the following: + +```toml +[rust] +deny-warnings = false +``` + +### Prerequisite: Supplying OpenSSL + +As a Tier 3 target, `openssl_sys` lacks the vendored OpenSSL library for this target. You will need to provide a prebuilt OpenSSL library to link `cargo`. Since we have a pre-configured sysroot, we can point to it directly: + +```sh +export MIPSISA64R6EL_UNKNOWN_LINUX_GNUABI64_OPENSSL_NO_VENDOR=y +export MIPSISA64R6EL_UNKNOWN_LINUX_GNUABI64_OPENSSL_DIR="/var/ab/cross-root/mips64r6el/usr" +``` + +On Debian, you may need to provide library path and include path separately: + +```sh +export MIPSISA64R6EL_UNKNOWN_LINUX_GNUABI64_OPENSSL_NO_VENDOR=y +export MIPSISA64R6EL_UNKNOWN_LINUX_GNUABI64_OPENSSL_LIB_DIR="/usr/lib/mipsisa64r6el-linux-gnuabi64/" +export MIPSISA64R6EL_UNKNOWN_LINUX_GNUABI64_OPENSSL_INCLUDE_DIR="/usr/include" +``` + +### Launching `x.py` + +```toml +[build] +target = ["mipsisa64r6el-unknown-linux-gnuabi64"] +``` + +Make sure that `mipsisa64r6el-unknown-linux-gnuabi64-gcc` is available from your executable search path (`$PATH`). + +Alternatively, you can specify the directories to all necessary toolchain executables in `config.toml`: + +```toml +[target.mipsisa64r6el-unknown-linux-gnuabi64] +# Adjust the paths below to point to your toolchain installation prefix. +cc = "/toolchain_prefix/bin/mipsisa64r6el-unknown-linux-gnuabi64-gcc" +cxx = "/toolchain_prefix/bin/mipsisa64r6el-unknown-linux-gnuabi64-g++" +ar = "/toolchain_prefix/bin/mipsisa64r6el-unknown-linux-gnuabi64-gcc-ar" +ranlib = "/toolchain_prefix/bin/mipsisa64r6el-unknown-linux-gnuabi64-ranlib" +linker = "/toolchain_prefix/bin/mipsisa64r6el-unknown-linux-gnuabi64-gcc" +``` + +Or, you can specify your cross compiler toolchain with an environment variable: + +```sh +export CROSS_COMPILE="/opt/abcross/mips64r6el/bin/mipsisa64r6el-aosc-linux-gnuabi64-" +``` + +Finally, launch the build script: + +```sh +./x.py build +``` + +### Tips + +- Avoid setting `cargo-native-static` to `false`, as this will result in a redundant artifact error while building clippy: + ```text + duplicate artifacts found when compiling a tool, this typically means that something was recompiled because a transitive dependency has different features activated than in a previous build: + + the following dependencies have different features: + syn 2.0.8 (registry+https://github.com/rust-lang/crates.io-index) + `clippy-driver` additionally enabled features {"full"} at ... + `cargo` additionally enabled features {} at ... + + to fix this you will probably want to edit the local src/tools/rustc-workspace-hack/Cargo.toml crate, as that will update the dependency graph to ensure that these crates all share the same feature set + thread 'main' panicked at 'tools should not compile multiple copies of the same crate', tool.rs:250:13 + note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace + ``` + +## Building Rust programs + +To build Rust programs for MIPS R6 targets, for instance, the `mipsisa64r6el-unknown-linux-gnuabi64` target: + +```bash +cargo build --target mipsisa64r6el-unknown-linux-gnuabi64 +``` + +## Testing + +To test a cross-compiled binary on your build system, install the Qemu user emulator that support the MIPS R6 architecture (`qemu-user-mipsel` or `qemu-user-mips64el`). GCC runtime libraries (`libgcc_s`) for the target architecture should be present in target sysroot to run the program. + +```sh +env \ + CARGO_TARGET_MIPSISA64R6EL_UNKNOWN_LINUX_GNUABI64_LINKER="/opt/abcross/mips64r6el/bin/mipsisa64r6el-aosc-linux-gnuabi64-gcc" \ + CARGO_TARGET_MIPSISA64R6EL_UNKNOWN_LINUX_GNUABI64_RUNNER="qemu-mips64el-static -L /var/ab/cross-root/mips64r6el" \ + cargo run --release \ + --target mipsisa64r6el-unknown-linux-gnuabi64 +``` + +## Tips for building Rust programs for MIPS R6 + +- Until we finalize a fix, please make sure the aforementioned workarounds for `rustix` crate and LLVM are always applied. This can be achieved by setting the relevant environment variables, and editing `Cargo.toml` before building. diff --git a/tests/ui/traits/new-solver/alias_eq_simple.rs b/tests/ui/traits/new-solver/alias_eq_simple.rs index 6792cf3ce35ab..37c0adbbc8baf 100644 --- a/tests/ui/traits/new-solver/alias_eq_simple.rs +++ b/tests/ui/traits/new-solver/alias_eq_simple.rs @@ -1,5 +1,12 @@ // check-pass // compile-flags: -Ztrait-solver=next +// compile-flags: -Zdump-solver-proof-tree=always +// compile-flags: -Zdump-solver-proof-tree-use-cache=no + +#![feature(rustc_attrs)] +#![rustc_filter_proof_tree_dump( + "Binder { value: TraitPredicate(<(i32, u32) as TraitA>, polarity:Positive), bound_vars: [] }" +)] // test that the new solver can handle `alias-eq(::Assoc, u32)` diff --git a/tests/ui/traits/new-solver/alias_eq_simple.stdout b/tests/ui/traits/new-solver/alias_eq_simple.stdout new file mode 100644 index 0000000000000..e93595d412c0d --- /dev/null +++ b/tests/ui/traits/new-solver/alias_eq_simple.stdout @@ -0,0 +1,96 @@ +GOAL: Goal { predicate: Binder { value: TraitPredicate(<(i32, u32) as TraitA>, polarity:Positive), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst } } +CANONICALIZED: Canonical { value: QueryInput { goal: Goal { predicate: Binder { value: TraitPredicate(<(i32, u32) as TraitA>, polarity:Positive), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst } }, anchor: Bind(DefId(0:12 ~ alias_eq_simple[3247]::main)), predefined_opaques_in_body: PredefinedOpaques(PredefinedOpaquesData { opaque_types: [] }) }, max_universe: U0, variables: [] } +REVISION 0: Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] }) + INSTANTIATED: QueryInput { goal: Goal { predicate: Binder { value: TraitPredicate(<(i32, u32) as TraitA>, polarity:Positive), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst } }, anchor: Bind(DefId(0:12 ~ alias_eq_simple[3247]::main)), predefined_opaques_in_body: PredefinedOpaques(PredefinedOpaquesData { opaque_types: [] }) } + CANDIDATE impl: Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] }) + TRY_EVALUATE_ADDED_GOALS: Ok(Yes) + REVISION 0 + GOAL: Goal { predicate: Binder { value: AliasRelate(Term::Ty(u32), Equate, Term::Ty(<_ as TraitB>::Assoc)), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst } } + CANONICALIZED: Canonical { value: QueryInput { goal: Goal { predicate: Binder { value: AliasRelate(Term::Ty(u32), Equate, Term::Ty(::Assoc)), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst } }, anchor: Bind(DefId(0:12 ~ alias_eq_simple[3247]::main)), predefined_opaques_in_body: PredefinedOpaques(PredefinedOpaquesData { opaque_types: [] }) }, max_universe: U0, variables: [] } + REVISION 0: Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] }) + INSTANTIATED: QueryInput { goal: Goal { predicate: Binder { value: AliasRelate(Term::Ty(u32), Equate, Term::Ty(::Assoc)), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst } }, anchor: Bind(DefId(0:12 ~ alias_eq_simple[3247]::main)), predefined_opaques_in_body: PredefinedOpaques(PredefinedOpaquesData { opaque_types: [] }) } + CANDIDATE normalizes-to: Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] }) + TRY_EVALUATE_ADDED_GOALS: Ok(Yes) + REVISION 0 + GOAL: Goal { predicate: Binder { value: ProjectionPredicate(AliasTy { substs: [i32], def_id: DefId(0:5 ~ alias_eq_simple[3247]::TraitB::Assoc) }, Term::Ty(u32)), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst } } + CANONICALIZED: Canonical { value: QueryInput { goal: Goal { predicate: Binder { value: ProjectionPredicate(AliasTy { substs: [i32], def_id: DefId(0:5 ~ alias_eq_simple[3247]::TraitB::Assoc) }, Term::Ty(u32)), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst } }, anchor: Bind(DefId(0:12 ~ alias_eq_simple[3247]::main)), predefined_opaques_in_body: PredefinedOpaques(PredefinedOpaquesData { opaque_types: [] }) }, max_universe: U0, variables: [] } + REVISION 0: Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] }) + INSTANTIATED: QueryInput { goal: Goal { predicate: Binder { value: ProjectionPredicate(AliasTy { substs: [i32], def_id: DefId(0:5 ~ alias_eq_simple[3247]::TraitB::Assoc) }, Term::Ty(u32)), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst } }, anchor: Bind(DefId(0:12 ~ alias_eq_simple[3247]::main)), predefined_opaques_in_body: PredefinedOpaques(PredefinedOpaquesData { opaque_types: [] }) } + TRY_EVALUATE_ADDED_GOALS: Ok(Yes) + REVISION 0 + NORMALIZES-TO HACK GOAL: Goal { predicate: Binder { value: ProjectionPredicate(AliasTy { substs: [i32], def_id: DefId(0:5 ~ alias_eq_simple[3247]::TraitB::Assoc) }, Term::Ty(_)), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst } } + CANONICALIZED: Canonical { value: QueryInput { goal: Goal { predicate: Binder { value: ProjectionPredicate(AliasTy { substs: [i32], def_id: DefId(0:5 ~ alias_eq_simple[3247]::TraitB::Assoc) }, Term::Ty(^1_0)), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst } }, anchor: Bind(DefId(0:12 ~ alias_eq_simple[3247]::main)), predefined_opaques_in_body: PredefinedOpaques(PredefinedOpaquesData { opaque_types: [] }) }, max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] } + REVISION 0: Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [u32] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] }) + INSTANTIATED: QueryInput { goal: Goal { predicate: Binder { value: ProjectionPredicate(AliasTy { substs: [i32], def_id: DefId(0:5 ~ alias_eq_simple[3247]::TraitB::Assoc) }, Term::Ty(_)), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst } }, anchor: Bind(DefId(0:12 ~ alias_eq_simple[3247]::main)), predefined_opaques_in_body: PredefinedOpaques(PredefinedOpaquesData { opaque_types: [] }) } + CANDIDATE impl: Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [u32] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] }) + TRY_EVALUATE_ADDED_GOALS: Ok(Yes) + REVISION 0 + RESULT: Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [u32] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] }) + RESULT: Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] }) + RESULT: Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] }) + GOAL: Goal { predicate: Binder { value: TraitPredicate(<_ as std::marker::Sized>, polarity:Positive), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst } } + CANONICALIZED: Canonical { value: QueryInput { goal: Goal { predicate: Binder { value: TraitPredicate(, polarity:Positive), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst } }, anchor: Bind(DefId(0:12 ~ alias_eq_simple[3247]::main)), predefined_opaques_in_body: PredefinedOpaques(PredefinedOpaquesData { opaque_types: [] }) }, max_universe: U0, variables: [] } + REVISION 0: Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] }) + INSTANTIATED: QueryInput { goal: Goal { predicate: Binder { value: TraitPredicate(, polarity:Positive), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst } }, anchor: Bind(DefId(0:12 ~ alias_eq_simple[3247]::main)), predefined_opaques_in_body: PredefinedOpaques(PredefinedOpaquesData { opaque_types: [] }) } + CANDIDATE constituent tys: Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] }) + TRY_EVALUATE_ADDED_GOALS: Ok(Yes) + REVISION 0 + RESULT: Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] }) + GOAL: Goal { predicate: Binder { value: TraitPredicate(<_ as TraitB>, polarity:Positive), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst } } + CANONICALIZED: Canonical { value: QueryInput { goal: Goal { predicate: Binder { value: TraitPredicate(, polarity:Positive), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst } }, anchor: Bind(DefId(0:12 ~ alias_eq_simple[3247]::main)), predefined_opaques_in_body: PredefinedOpaques(PredefinedOpaquesData { opaque_types: [] }) }, max_universe: U0, variables: [] } + REVISION 0: Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] }) + INSTANTIATED: QueryInput { goal: Goal { predicate: Binder { value: TraitPredicate(, polarity:Positive), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst } }, anchor: Bind(DefId(0:12 ~ alias_eq_simple[3247]::main)), predefined_opaques_in_body: PredefinedOpaques(PredefinedOpaquesData { opaque_types: [] }) } + CANDIDATE impl: Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] }) + TRY_EVALUATE_ADDED_GOALS: Ok(Yes) + REVISION 0 + RESULT: Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] }) +RESULT: Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] }) + +GOAL: Goal { predicate: Binder { value: TraitPredicate(<(i32, u32) as TraitA>, polarity:Positive), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst } } +CANONICALIZED: Canonical { value: QueryInput { goal: Goal { predicate: Binder { value: TraitPredicate(<(i32, u32) as TraitA>, polarity:Positive), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst } }, anchor: Bind(DefId(0:12 ~ alias_eq_simple[3247]::main)), predefined_opaques_in_body: PredefinedOpaques(PredefinedOpaquesData { opaque_types: [] }) }, max_universe: U0, variables: [] } +REVISION 0: Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] }) + INSTANTIATED: QueryInput { goal: Goal { predicate: Binder { value: TraitPredicate(<(i32, u32) as TraitA>, polarity:Positive), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst } }, anchor: Bind(DefId(0:12 ~ alias_eq_simple[3247]::main)), predefined_opaques_in_body: PredefinedOpaques(PredefinedOpaquesData { opaque_types: [] }) } + CANDIDATE impl: Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] }) + TRY_EVALUATE_ADDED_GOALS: Ok(Yes) + REVISION 0 + GOAL: Goal { predicate: Binder { value: AliasRelate(Term::Ty(u32), Equate, Term::Ty(<_ as TraitB>::Assoc)), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst } } + CANONICALIZED: Canonical { value: QueryInput { goal: Goal { predicate: Binder { value: AliasRelate(Term::Ty(u32), Equate, Term::Ty(::Assoc)), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst } }, anchor: Bind(DefId(0:12 ~ alias_eq_simple[3247]::main)), predefined_opaques_in_body: PredefinedOpaques(PredefinedOpaquesData { opaque_types: [] }) }, max_universe: U0, variables: [] } + REVISION 0: Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] }) + INSTANTIATED: QueryInput { goal: Goal { predicate: Binder { value: AliasRelate(Term::Ty(u32), Equate, Term::Ty(::Assoc)), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst } }, anchor: Bind(DefId(0:12 ~ alias_eq_simple[3247]::main)), predefined_opaques_in_body: PredefinedOpaques(PredefinedOpaquesData { opaque_types: [] }) } + CANDIDATE normalizes-to: Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] }) + TRY_EVALUATE_ADDED_GOALS: Ok(Yes) + REVISION 0 + GOAL: Goal { predicate: Binder { value: ProjectionPredicate(AliasTy { substs: [i32], def_id: DefId(0:5 ~ alias_eq_simple[3247]::TraitB::Assoc) }, Term::Ty(u32)), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst } } + CANONICALIZED: Canonical { value: QueryInput { goal: Goal { predicate: Binder { value: ProjectionPredicate(AliasTy { substs: [i32], def_id: DefId(0:5 ~ alias_eq_simple[3247]::TraitB::Assoc) }, Term::Ty(u32)), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst } }, anchor: Bind(DefId(0:12 ~ alias_eq_simple[3247]::main)), predefined_opaques_in_body: PredefinedOpaques(PredefinedOpaquesData { opaque_types: [] }) }, max_universe: U0, variables: [] } + REVISION 0: Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] }) + INSTANTIATED: QueryInput { goal: Goal { predicate: Binder { value: ProjectionPredicate(AliasTy { substs: [i32], def_id: DefId(0:5 ~ alias_eq_simple[3247]::TraitB::Assoc) }, Term::Ty(u32)), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst } }, anchor: Bind(DefId(0:12 ~ alias_eq_simple[3247]::main)), predefined_opaques_in_body: PredefinedOpaques(PredefinedOpaquesData { opaque_types: [] }) } + TRY_EVALUATE_ADDED_GOALS: Ok(Yes) + REVISION 0 + NORMALIZES-TO HACK GOAL: Goal { predicate: Binder { value: ProjectionPredicate(AliasTy { substs: [i32], def_id: DefId(0:5 ~ alias_eq_simple[3247]::TraitB::Assoc) }, Term::Ty(_)), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst } } + CANONICALIZED: Canonical { value: QueryInput { goal: Goal { predicate: Binder { value: ProjectionPredicate(AliasTy { substs: [i32], def_id: DefId(0:5 ~ alias_eq_simple[3247]::TraitB::Assoc) }, Term::Ty(^1_0)), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst } }, anchor: Bind(DefId(0:12 ~ alias_eq_simple[3247]::main)), predefined_opaques_in_body: PredefinedOpaques(PredefinedOpaquesData { opaque_types: [] }) }, max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] } + REVISION 0: Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [u32] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] }) + INSTANTIATED: QueryInput { goal: Goal { predicate: Binder { value: ProjectionPredicate(AliasTy { substs: [i32], def_id: DefId(0:5 ~ alias_eq_simple[3247]::TraitB::Assoc) }, Term::Ty(_)), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst } }, anchor: Bind(DefId(0:12 ~ alias_eq_simple[3247]::main)), predefined_opaques_in_body: PredefinedOpaques(PredefinedOpaquesData { opaque_types: [] }) } + CANDIDATE impl: Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [u32] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] }) + TRY_EVALUATE_ADDED_GOALS: Ok(Yes) + REVISION 0 + RESULT: Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [u32] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] }) + RESULT: Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] }) + RESULT: Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] }) + GOAL: Goal { predicate: Binder { value: TraitPredicate(<_ as std::marker::Sized>, polarity:Positive), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst } } + CANONICALIZED: Canonical { value: QueryInput { goal: Goal { predicate: Binder { value: TraitPredicate(, polarity:Positive), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst } }, anchor: Bind(DefId(0:12 ~ alias_eq_simple[3247]::main)), predefined_opaques_in_body: PredefinedOpaques(PredefinedOpaquesData { opaque_types: [] }) }, max_universe: U0, variables: [] } + REVISION 0: Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] }) + INSTANTIATED: QueryInput { goal: Goal { predicate: Binder { value: TraitPredicate(, polarity:Positive), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst } }, anchor: Bind(DefId(0:12 ~ alias_eq_simple[3247]::main)), predefined_opaques_in_body: PredefinedOpaques(PredefinedOpaquesData { opaque_types: [] }) } + CANDIDATE constituent tys: Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] }) + TRY_EVALUATE_ADDED_GOALS: Ok(Yes) + REVISION 0 + RESULT: Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] }) + GOAL: Goal { predicate: Binder { value: TraitPredicate(<_ as TraitB>, polarity:Positive), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst } } + CANONICALIZED: Canonical { value: QueryInput { goal: Goal { predicate: Binder { value: TraitPredicate(, polarity:Positive), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst } }, anchor: Bind(DefId(0:12 ~ alias_eq_simple[3247]::main)), predefined_opaques_in_body: PredefinedOpaques(PredefinedOpaquesData { opaque_types: [] }) }, max_universe: U0, variables: [] } + REVISION 0: Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] }) + INSTANTIATED: QueryInput { goal: Goal { predicate: Binder { value: TraitPredicate(, polarity:Positive), bound_vars: [] }, param_env: ParamEnv { caller_bounds: [], reveal: UserFacing, constness: NotConst } }, anchor: Bind(DefId(0:12 ~ alias_eq_simple[3247]::main)), predefined_opaques_in_body: PredefinedOpaques(PredefinedOpaquesData { opaque_types: [] }) } + CANDIDATE impl: Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] }) + TRY_EVALUATE_ADDED_GOALS: Ok(Yes) + REVISION 0 + RESULT: Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] }) +RESULT: Ok(Canonical { value: Response { certainty: Yes, var_values: CanonicalVarValues { var_values: [] }, external_constraints: ExternalConstraints(ExternalConstraintsData { region_constraints: QueryRegionConstraints { outlives: [], member_constraints: [] }, opaque_types: [] }) }, max_universe: U0, variables: [] }) + diff --git a/tests/ui/type-alias/lazy-type-alias-enum-variant.rs b/tests/ui/type-alias/lazy-type-alias-enum-variant.rs new file mode 100644 index 0000000000000..78c3159d1c2db --- /dev/null +++ b/tests/ui/type-alias/lazy-type-alias-enum-variant.rs @@ -0,0 +1,17 @@ +// Regression test for issue #113736. +// check-pass + +#![feature(lazy_type_alias)] + +enum Enum { + Unit, + Tuple(), + Struct {}, +} + +fn main() { + type Alias = Enum; + let _ = Alias::Unit; + let _ = Alias::Tuple(); + let _ = Alias::Struct {}; +}