Small fixes from review

This commit is contained in:
Maybe Lapkin 2024-06-23 22:29:08 +02:00
parent 06863eeebf
commit cf7032f751
2 changed files with 4 additions and 4 deletions

View File

@ -123,9 +123,9 @@ hir_typeck_option_result_asref = use `{$def_path}::as_ref` to convert `{$expecte
hir_typeck_option_result_cloned = use `{$def_path}::cloned` to clone the value inside the `{$def_path}`
hir_typeck_option_result_copied = use `{$def_path}::copied` to copy the value inside the `{$def_path}`
hir_typeck_ptr_cast_add_auto_to_object = adding an auto {$traits_len ->
[1] trait {$traits}
*[other] traits {$traits}
hir_typeck_ptr_cast_add_auto_to_object = adding {$traits_len ->
[1] an auto trait {$traits}
*[other] auto traits {$traits}
} to a trait object in a pointer cast may cause UB later on
hir_typeck_remove_semi_for_coerce = you might have meant to return the `match` expression

View File

@ -808,7 +808,7 @@ impl<'a, 'tcx> CastCheck<'tcx> {
m_src: ty::TypeAndMut<'tcx>,
m_dst: ty::TypeAndMut<'tcx>,
) -> Result<CastKind, CastError> {
debug!("check_ptr_ptr_cast m_expr={:?} m_cast={:?}", m_src, m_dst);
debug!("check_ptr_ptr_cast m_src={m_src:?} m_dst={m_dst:?}");
// ptr-ptr cast. vtables must match.
let src_kind = fcx.tcx.erase_regions(fcx.pointer_kind(m_src.ty, self.span)?);