about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/src/vtable.rs
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2023-08-27 18:12:34 +0200
committerRalf Jung <post@ralfj.de>2023-08-29 09:03:46 +0200
commitb2ebf1c23f93886ba7d3738878f04e275add4ead (patch)
tree78fd882aab805988388cbb4d3ead89ba112b23c7 /compiler/rustc_codegen_cranelift/src/vtable.rs
parentbf91321e0fc9cb9cd921263ac473c5255dc8cc14 (diff)
downloadrust-b2ebf1c23f93886ba7d3738878f04e275add4ead.tar.gz
rust-b2ebf1c23f93886ba7d3738878f04e275add4ead.zip
const_eval and codegen: audit uses of is_zst
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src/vtable.rs')
-rw-r--r--compiler/rustc_codegen_cranelift/src/vtable.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/vtable.rs b/compiler/rustc_codegen_cranelift/src/vtable.rs
index b309695c190..7598c6eee03 100644
--- a/compiler/rustc_codegen_cranelift/src/vtable.rs
+++ b/compiler/rustc_codegen_cranelift/src/vtable.rs
@@ -51,8 +51,8 @@ pub(crate) fn get_ptr_and_method_ref<'tcx>(
             '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, FieldIdx::new(i));
-                    if !field.layout().is_zst() {
-                        // we found the one non-zero-sized field that is allowed
+                    if !field.layout().is_1zst() {
+                        // we found the one non-1-ZST field that is allowed
                         // now find *its* non-zero-sized field, or stop if it's a
                         // pointer
                         arg = field;