diff options
| author | Ralf Jung <post@ralfj.de> | 2022-07-19 19:50:04 -0400 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2022-07-20 17:12:07 -0400 |
| commit | 5e840c5c8c75081dda4b33f8afcb0c77ad3105bb (patch) | |
| tree | 04c4b2e6e9bb5210805b27ac89f990098b5e157c /compiler/rustc_const_eval/src/interpret/traits.rs | |
| parent | 8affef2ccba424f37445f6df6592426600d00a31 (diff) | |
| download | rust-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.rs | 7 |
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>, |
