remove Ty::is_copy_modulo_regions
This commit is contained in:
parent
cfee10ce89
commit
e089bead32
15 changed files with 36 additions and 29 deletions
|
@ -586,7 +586,7 @@ impl<'tcx> LateLintPass<'tcx> for MissingCopyImplementations {
|
|||
return;
|
||||
}
|
||||
}
|
||||
if ty.is_copy_modulo_regions(cx.tcx, cx.typing_env()) {
|
||||
if cx.type_is_copy_modulo_regions(ty) {
|
||||
return;
|
||||
}
|
||||
if type_implements_negative_copy_modulo_regions(cx.tcx, ty, cx.typing_env()) {
|
||||
|
|
|
@ -710,6 +710,10 @@ impl<'tcx> LateContext<'tcx> {
|
|||
TypingEnv { typing_mode: self.typing_mode(), param_env: self.param_env }
|
||||
}
|
||||
|
||||
pub fn type_is_copy_modulo_regions(&self, ty: Ty<'tcx>) -> bool {
|
||||
self.tcx.type_is_copy_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>> {
|
||||
|
|
|
@ -144,7 +144,7 @@ impl<'tcx> LateLintPass<'tcx> for DropForgetUseless {
|
|||
&& let Some(fn_name) = cx.tcx.get_diagnostic_name(def_id)
|
||||
{
|
||||
let arg_ty = cx.typeck_results().expr_ty(arg);
|
||||
let is_copy = arg_ty.is_copy_modulo_regions(cx.tcx, cx.typing_env());
|
||||
let is_copy = cx.type_is_copy_modulo_regions(arg_ty);
|
||||
let drop_is_single_call_in_arm = is_single_call_in_arm(cx, arg, expr);
|
||||
let let_underscore_ignore_sugg = || {
|
||||
if let Some((_, node)) = cx.tcx.hir().parent_iter(expr.hir_id).nth(0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue