about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src/interpret/traits.rs
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2022-07-19 19:50:04 -0400
committerRalf Jung <post@ralfj.de>2022-07-20 17:12:07 -0400
commit5e840c5c8c75081dda4b33f8afcb0c77ad3105bb (patch)
tree04c4b2e6e9bb5210805b27ac89f990098b5e157c /compiler/rustc_const_eval/src/interpret/traits.rs
parent8affef2ccba424f37445f6df6592426600d00a31 (diff)
downloadrust-5e840c5c8c75081dda4b33f8afcb0c77ad3105bb.tar.gz
rust-5e840c5c8c75081dda4b33f8afcb0c77ad3105bb.zip
incorporate some review feedback
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret/traits.rs')
-rw-r--r--compiler/rustc_const_eval/src/interpret/traits.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/traits.rs b/compiler/rustc_const_eval/src/interpret/traits.rs
index bddca2a20ed..b3a511d5a49 100644
--- a/compiler/rustc_const_eval/src/interpret/traits.rs
+++ b/compiler/rustc_const_eval/src/interpret/traits.rs
@@ -10,9 +10,10 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
     /// Creates a dynamic vtable for the given type and vtable origin. This is used only for
     /// objects.
     ///
-    /// The `trait_ref` encodes the erased self type. Hence, if we are
-    /// making an object `Foo<Trait>` from a value of type `Foo<T>`, then
-    /// `trait_ref` would map `T: Trait`.
+    /// The `trait_ref` encodes the erased self type. Hence, if we are making an object `Foo<Trait>`
+    /// from a value of type `Foo<T>`, then `trait_ref` would map `T: Trait`. `None` here means that
+    /// this is an auto trait without any methods, so we only need the basic vtable (drop, size,
+    /// align).
     pub fn get_vtable_ptr(
         &self,
         ty: Ty<'tcx>,