Skip to content

Commit

Permalink
Remove Ty::is_region_ptr
Browse files Browse the repository at this point in the history
  • Loading branch information
mu001999 committed Mar 20, 2023
1 parent edb0717 commit 60aafee
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/vtable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ pub(crate) fn get_ptr_and_method_ref<'tcx>(
) -> (Pointer, Value) {
let (ptr, vtable) = 'block: {
if let Abi::Scalar(_) = arg.layout().abi {
'descend_newtypes: while !arg.layout().ty.is_unsafe_ptr()
&& !arg.layout().ty.is_region_ptr()
{
'descend_newtypes: while !arg.layout().ty.is_unsafe_ptr() && !arg.layout().ty.is_ref() {
for i in 0..arg.layout().fields.count() {
let field = arg.value_field(fx, mir::Field::new(i));
if !field.layout().is_zst() {
Expand Down

0 comments on commit 60aafee

Please sign in to comment.