1
Fork 0

Account for UseCloned on expr_use_visitor

This commit is contained in:
Santiago Pastorino 2025-02-20 14:34:49 -03:00
parent edcbc9b535
commit b43b700250
No known key found for this signature in database
GPG key ID: 8131A24E0C79EFAF
6 changed files with 98 additions and 2 deletions

View file

@ -683,6 +683,10 @@ impl<'tcx> LateContext<'tcx> {
self.tcx.type_is_copy_modulo_regions(self.typing_env(), ty)
}
pub fn type_is_use_cloned_modulo_regions(&self, ty: Ty<'tcx>) -> bool {
self.tcx.type_is_use_cloned_modulo_regions(self.typing_env(), ty)
}
/// Gets the type-checking results for the current body,
/// or `None` if outside a body.
pub fn maybe_typeck_results(&self) -> Option<&'tcx ty::TypeckResults<'tcx>> {