Skip to content

Commit 2634b4b

Browse files
committed
small coherence cleanup
1 parent 0d45ef8 commit 2634b4b

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

compiler/rustc_trait_selection/src/traits/coherence.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -792,11 +792,8 @@ pub fn orphan_check_trait_ref<'tcx, E: Debug>(
792792
in_crate: InCrate,
793793
lazily_normalize_ty: impl FnMut(Ty<'tcx>) -> Result<Ty<'tcx>, E>,
794794
) -> Result<Result<(), OrphanCheckErr<'tcx, Ty<'tcx>>>, E> {
795-
if trait_ref.has_infer() && trait_ref.has_param() {
796-
bug!(
797-
"can't orphan check a trait ref with both params and inference variables {:?}",
798-
trait_ref
799-
);
795+
if trait_ref.has_param() {
796+
bug!("orphan check only expects inference variables: {trait_ref:?}");
800797
}
801798

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

0 commit comments

Comments
 (0)