Skip to content

Commit

Permalink
Update compiler/rustc_hir_analysis/src/astconv/bounds.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
fmease authored Feb 23, 2024
1 parent b94498a commit 2b166bd
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions compiler/rustc_hir_analysis/src/astconv/bounds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -433,12 +433,11 @@ impl<'tcx> dyn AstConv<'tcx> + '_ {
});

// Provide the resolved type of the associated constant to `type_of(AnonConst)`.
if !speculative && let ty::AssocKind::Const = assoc_kind {
let hir::TypeBindingKind::Equality { term: hir::Term::Const(anon_const) } =
binding.kind
else {
bug!()
};
if !speculative
&& let hir::TypeBindingKind::Equality {
term: hir::Term::Const(anon_const),
} = binding.kind
{
let ty = alias_ty.map_bound(|ty| tcx.type_of(ty.def_id).instantiate(tcx, ty.args));
// Since the arguments passed to the alias type above may contain early-bound
// generic parameters, the instantiated type may contain some as well.
Expand Down

0 comments on commit 2b166bd

Please sign in to comment.