diff options
| author | Cameron Steffen <cam.steffen94@gmail.com> | 2025-08-12 17:57:02 -0500 |
|---|---|---|
| committer | Cameron Steffen <cam.steffen94@gmail.com> | 2025-08-13 09:33:09 -0500 |
| commit | d4eb0947f133d8f44594d7551d99a48daff21c02 (patch) | |
| tree | e583a3c324728309c739c277554dba69495535e9 /compiler/rustc_trait_selection | |
| parent | 8e62bfd311791bfd9dca886abdfbab07ec54d8b4 (diff) | |
| download | rust-d4eb0947f133d8f44594d7551d99a48daff21c02.tar.gz rust-d4eb0947f133d8f44594d7551d99a48daff21c02.zip | |
Cleanup assoc parent utils
Diffstat (limited to 'compiler/rustc_trait_selection')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/project.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/project.rs b/compiler/rustc_trait_selection/src/traits/project.rs index 581191b2036..884d53732fe 100644 --- a/compiler/rustc_trait_selection/src/traits/project.rs +++ b/compiler/rustc_trait_selection/src/traits/project.rs @@ -1507,7 +1507,7 @@ fn confirm_builtin_candidate<'cx, 'tcx>( let tcx = selcx.tcx(); let self_ty = obligation.predicate.self_ty(); let item_def_id = obligation.predicate.def_id; - let trait_def_id = tcx.trait_of_assoc(item_def_id).unwrap(); + let trait_def_id = tcx.parent(item_def_id); let args = tcx.mk_args(&[self_ty.into()]); let (term, obligations) = if tcx.is_lang_item(trait_def_id, LangItem::DiscriminantKind) { let discriminant_def_id = |
