We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e1e0989 commit c22dfabCopy full SHA for c22dfab
compiler/rustc_trait_selection/src/traits/mod.rs
@@ -765,8 +765,8 @@ pub fn vtable_trait_upcasting_coercion_new_vptr_slot(
765
),
766
) -> Option<usize> {
767
let (source, target) = key;
768
- debug_assert!(matches!(&source.kind(), &ty::Dynamic(..)));
769
- debug_assert!(matches!(&target.kind(), &ty::Dynamic(..)));
+ assert!(matches!(&source.kind(), &ty::Dynamic(..)) && !source.needs_infer());
+ assert!(matches!(&target.kind(), &ty::Dynamic(..)) && !target.needs_infer());
770
771
// this has been typecked-before, so diagnostics is not really needed.
772
let unsize_trait_did = tcx.require_lang_item(LangItem::Unsize, None);
0 commit comments