diff options
| author | lcnr <rust@lcnr.de> | 2025-04-26 01:54:09 +0000 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2025-04-26 02:05:31 +0000 |
| commit | 855035b03860b00b6f8239e31beec0d3cb882db6 (patch) | |
| tree | 043abebe24437559bcc9ca5e931bb8113451ada4 /compiler/rustc_hir_analysis/src/impl_wf_check | |
| parent | e3e432d4d65a55e6db167598e96db2bcb163e316 (diff) | |
| download | rust-855035b03860b00b6f8239e31beec0d3cb882db6.tar.gz rust-855035b03860b00b6f8239e31beec0d3cb882db6.zip | |
convert some `GenericArg` to `Term`
Diffstat (limited to 'compiler/rustc_hir_analysis/src/impl_wf_check')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/impl_wf_check/min_specialization.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_hir_analysis/src/impl_wf_check/min_specialization.rs b/compiler/rustc_hir_analysis/src/impl_wf_check/min_specialization.rs index af1107b499f..309221f9a12 100644 --- a/compiler/rustc_hir_analysis/src/impl_wf_check/min_specialization.rs +++ b/compiler/rustc_hir_analysis/src/impl_wf_check/min_specialization.rs @@ -374,9 +374,12 @@ fn check_predicates<'tcx>( // Include the well-formed predicates of the type parameters of the impl. for arg in tcx.impl_trait_ref(impl1_def_id).unwrap().instantiate_identity().args { + let Some(term) = arg.as_term() else { + continue; + }; let infcx = &tcx.infer_ctxt().build(TypingMode::non_body_analysis()); let obligations = - wf::obligations(infcx, tcx.param_env(impl1_def_id), impl1_def_id, 0, arg, span) + wf::obligations(infcx, tcx.param_env(impl1_def_id), impl1_def_id, 0, term, span) .unwrap(); assert!(!obligations.has_infer()); |
