remove is_trivially_const_drop
This commit is contained in:
parent
743003b1a6
commit
bd00de7123
3 changed files with 3 additions and 48 deletions
|
@ -170,11 +170,6 @@ impl Qualif for NeedsNonConstDrop {
|
|||
|
||||
#[instrument(level = "trace", skip(cx), ret)]
|
||||
fn in_any_value_of_ty<'tcx>(cx: &ConstCx<'_, 'tcx>, ty: Ty<'tcx>) -> bool {
|
||||
// Avoid selecting for simple cases, such as builtin types.
|
||||
if ty::util::is_trivially_const_drop(ty) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// If this doesn't need drop at all, then don't select `~const Destruct`.
|
||||
if !ty.needs_drop(cx.tcx, cx.typing_env) {
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue