Skip to content

Commit

Permalink
Fix order of Call trait clauses
Browse files Browse the repository at this point in the history
  • Loading branch information
Nadrieril committed Jan 17, 2025
1 parent 54a4159 commit 591da2b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions frontend/exporter/src/types/mir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -398,9 +398,11 @@ pub(crate) fn get_function_from_def_id_and_generics<'tcx, S: BaseState<'tcx> + H
// Solve the trait constraints of the impl block.
let container_generics = tcx.generics_of(container_def_id);
let container_generics = generics.truncate_to(tcx, container_generics);
let container_trait_refs =
// Prepend the container trait refs.
let mut combined_trait_refs =
solve_item_required_traits(s, container_def_id, container_generics);
trait_refs.extend(container_trait_refs);
combined_trait_refs.extend(std::mem::take(&mut trait_refs));
trait_refs = combined_trait_refs;
(generics.sinto(s), None)
}
}
Expand Down

0 comments on commit 591da2b

Please sign in to comment.