Skip to content

Commit

Permalink
small coherence cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
lcnr committed May 1, 2024
1 parent 0d45ef8 commit 2634b4b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions compiler/rustc_trait_selection/src/traits/coherence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -792,11 +792,8 @@ pub fn orphan_check_trait_ref<'tcx, E: Debug>(
in_crate: InCrate,
lazily_normalize_ty: impl FnMut(Ty<'tcx>) -> Result<Ty<'tcx>, E>,
) -> Result<Result<(), OrphanCheckErr<'tcx, Ty<'tcx>>>, E> {
if trait_ref.has_infer() && trait_ref.has_param() {
bug!(
"can't orphan check a trait ref with both params and inference variables {:?}",
trait_ref
);
if trait_ref.has_param() {
bug!("orphan check only expects inference variables: {trait_ref:?}");
}

let mut checker = OrphanChecker::new(in_crate, lazily_normalize_ty);
Expand Down

0 comments on commit 2634b4b

Please sign in to comment.