about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src/interpret
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2022-05-26 20:22:28 -0700
committerMichael Goulet <michael@errs.io>2022-05-28 11:38:22 -0700
commit34e05812e029206add91fa39df86765fcb3f8b5a (patch)
treefc2d0bfaf18186b591d68aa830c54026df9316b9 /compiler/rustc_const_eval/src/interpret
parenta056a953f00d7b78d12dc192b34c47cca6fa7b6b (diff)
downloadrust-34e05812e029206add91fa39df86765fcb3f8b5a.tar.gz
rust-34e05812e029206add91fa39df86765fcb3f8b5a.zip
Fix TyKind lint, make consts no longer fn, etc
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret')
-rw-r--r--compiler/rustc_const_eval/src/interpret/traits.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/traits.rs b/compiler/rustc_const_eval/src/interpret/traits.rs
index d5a448a8963..c4d1074e437 100644
--- a/compiler/rustc_const_eval/src/interpret/traits.rs
+++ b/compiler/rustc_const_eval/src/interpret/traits.rs
@@ -2,8 +2,8 @@ use std::convert::TryFrom;
 
 use rustc_middle::mir::interpret::{InterpResult, Pointer, PointerArithmetic};
 use rustc_middle::ty::{
-    self, common_vtable_entries, Ty, COMMON_VTABLE_ENTRIES_ALIGN,
-    COMMON_VTABLE_ENTRIES_DROPINPLACE, COMMON_VTABLE_ENTRIES_SIZE,
+    self, Ty, TyCtxt, COMMON_VTABLE_ENTRIES_ALIGN, COMMON_VTABLE_ENTRIES_DROPINPLACE,
+    COMMON_VTABLE_ENTRIES_SIZE,
 };
 use rustc_target::abi::{Align, Size};
 
@@ -38,7 +38,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
     }
 
     /// Resolves the function at the specified slot in the provided
-    /// vtable. Currently an index of '3' (`common_vtable_entries().len()`)
+    /// vtable. Currently an index of '3' (`TyCtxt::COMMON_VTABLE_ENTRIES.len()`)
     /// corresponds to the first method declared in the trait of the provided vtable.
     pub fn get_vtable_slot(
         &self,
@@ -64,7 +64,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
         let vtable = self
             .get_ptr_alloc(
                 vtable,
-                pointer_size * u64::try_from(common_vtable_entries().len()).unwrap(),
+                pointer_size * u64::try_from(TyCtxt::COMMON_VTABLE_ENTRIES.len()).unwrap(),
                 self.tcx.data_layout.pointer_align.abi,
             )?
             .expect("cannot be a ZST");
@@ -99,7 +99,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
         let vtable = self
             .get_ptr_alloc(
                 vtable,
-                pointer_size * u64::try_from(common_vtable_entries().len()).unwrap(),
+                pointer_size * u64::try_from(TyCtxt::COMMON_VTABLE_ENTRIES.len()).unwrap(),
                 self.tcx.data_layout.pointer_align.abi,
             )?
             .expect("cannot be a ZST");