short-circuit the easy cases in is_copy_modulo_regions
This change is somewhat extensive, since it affects MIR -- since this is called to determine Copy vs Move -- so any test that's `no_core` needs to actually have the normal `impl`s it uses.
This commit is contained in:
parent
b5a54d8777
commit
54408f0963
11 changed files with 18 additions and 2 deletions
|
@ -704,7 +704,7 @@ impl<'tcx> Ty<'tcx> {
|
|||
tcx_at: TyCtxtAt<'tcx>,
|
||||
param_env: ty::ParamEnv<'tcx>,
|
||||
) -> bool {
|
||||
tcx_at.is_copy_raw(param_env.and(self))
|
||||
self.is_trivially_pure_clone_copy() || tcx_at.is_copy_raw(param_env.and(self))
|
||||
}
|
||||
|
||||
/// Checks whether values of this type `T` have a size known at
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue