1
Fork 0

Do leak check after function ptr coercion

This commit is contained in:
Jack Huey 2022-05-20 02:00:42 -04:00
parent 4bb4dc4672
commit 683a9c8391
30 changed files with 271 additions and 256 deletions

View file

@ -151,6 +151,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
///
/// * From each pre-binding block to the next pre-binding block.
/// * From each otherwise block to the next pre-binding block.
#[tracing::instrument(level = "debug", skip(self, arms))]
pub(crate) fn match_expr(
&mut self,
destination: Place<'tcx>,

View file

@ -75,6 +75,7 @@ impl<'tcx> Cx<'tcx> {
};
let mut pattern = self.pattern_from_hir(local.pat);
debug!(?pattern);
if let Some(ty) = &local.ty {
if let Some(&user_ty) =

View file

@ -98,6 +98,7 @@ impl<'tcx> Cx<'tcx> {
}
}
#[tracing::instrument(level = "debug", skip(self))]
pub(crate) fn pattern_from_hir(&mut self, p: &hir::Pat<'_>) -> Pat<'tcx> {
let p = match self.tcx.hir().get(p.hir_id) {
Node::Pat(p) | Node::Binding(p) => p,