diff options
| author | Ana-Maria Mihalache <mihalacheana.maria@yahoo.com> | 2020-03-11 15:20:31 +0000 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2020-03-15 23:13:40 +0200 |
| commit | bc8ff3fe8e8cebc9e4855aaf44c19c887f8f4be4 (patch) | |
| tree | d59f481641349d58300c109d6e8fc68bbd137785 | |
| parent | 51ea260ee7ee896701ef7296d7f63e7ef455b383 (diff) | |
| download | rust-bc8ff3fe8e8cebc9e4855aaf44c19c887f8f4be4.tar.gz rust-bc8ff3fe8e8cebc9e4855aaf44c19c887f8f4be4.zip | |
rustc: tweak comments on InstanceDef.
| -rw-r--r-- | src/librustc/ty/instance.rs | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/librustc/ty/instance.rs b/src/librustc/ty/instance.rs index 07acb7abfdb..c9ad8707a74 100644 --- a/src/librustc/ty/instance.rs +++ b/src/librustc/ty/instance.rs @@ -40,10 +40,9 @@ pub enum InstanceDef<'tcx> { /// `<fn() as FnTrait>::call_*` /// `DefId` is `FnTrait::call_*`. /// - /// NB: the (`fn` pointer) type must be monomorphic for MIR shims to work. - // FIXME(eddyb) support generating shims for a "shallow type", - // e.g. `fn(_, _) -> _` instead of requiring a fully monomorphic - // `fn(Foo, Bar) -> Baz` etc. + /// NB: the (`fn` pointer) type must currently be monomorphic to avoid double substitution + /// problems with the MIR shim bodies. `Instance::resolve` enforces this. + // FIXME(#69925) support polymorphic MIR shim bodies properly instead. FnPtrShim(DefId, Ty<'tcx>), /// `<dyn Trait as Trait>::fn`, "direct calls" of which are implicitly @@ -63,18 +62,16 @@ pub enum InstanceDef<'tcx> { /// The `Option<Ty<'tcx>>` is either `Some(T)`, or `None` for empty drop /// glue. /// - /// NB: the type must be monomorphic for MIR shims to work. - // FIXME(eddyb) support generating shims for a "shallow type", - // e.g. `Foo<_>` or `[_]` instead of requiring a fully monomorphic - // `Foo<Bar>` or `[String]` etc. + /// NB: the type must currently be monomorphic to avoid double substitution + /// problems with the MIR shim bodies. `Instance::resolve` enforces this. + // FIXME(#69925) support polymorphic MIR shim bodies properly instead. DropGlue(DefId, Option<Ty<'tcx>>), ///`<T as Clone>::clone` shim. /// - /// NB: the type must be monomorphic for MIR shims to work. - // FIXME(eddyb) support generating shims for a "shallow type", - // e.g. `Foo<_>` or `[_]` instead of requiring a fully monomorphic - // `Foo<Bar>` or `[String]` etc. + /// NB: the type must currently be monomorphic to avoid double substitution + /// problems with the MIR shim bodies. `Instance::resolve` enforces this. + // FIXME(#69925) support polymorphic MIR shim bodies properly instead. CloneShim(DefId, Ty<'tcx>), } |
