]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_mir/monomorphize/mod.rs
Move some const-eval `build-pass` tests to `check-pass`
[rust.git] / src / librustc_mir / monomorphize / mod.rs
index 8bc63bfcfcbe34abb99ce413d02ad75f99fa44c6..7177bf726d4033b3caf36347b294dcb4be7ed85f 100644 (file)
@@ -13,12 +13,12 @@ pub fn custom_coerce_unsize_info<'tcx>(
     let def_id = tcx.lang_items().coerce_unsized_trait().unwrap();
 
     let trait_ref = ty::Binder::bind(ty::TraitRef {
-        def_id: def_id,
+        def_id,
         substs: tcx.mk_substs_trait(source_ty, &[target_ty.into()]),
     });
 
     match tcx.codegen_fulfill_obligation((ty::ParamEnv::reveal_all(), trait_ref)) {
-        traits::VtableImpl(traits::VtableImplData { impl_def_id, .. }) => {
+        Some(traits::VtableImpl(traits::VtableImplData { impl_def_id, .. })) => {
             tcx.coerce_unsized_info(impl_def_id).custom_kind.unwrap()
         }
         vtable => {