@@ -40,10 +40,9 @@ pub enum InstanceDef<'tcx> {
40
40
/// `<fn() as FnTrait>::call_*`
41
41
/// `DefId` is `FnTrait::call_*`.
42
42
///
43
- /// NB: the (`fn` pointer) type must be monomorphic for MIR shims to work.
44
- // FIXME(eddyb) support generating shims for a "shallow type",
45
- // e.g. `fn(_, _) -> _` instead of requiring a fully monomorphic
46
- // `fn(Foo, Bar) -> Baz` etc.
43
+ /// NB: the (`fn` pointer) type must currently be monomorphic to avoid double substitution
44
+ /// problems with the MIR shim bodies. `Instance::resolve` enforces this.
45
+ // FIXME(#69925) support polymorphic MIR shim bodies properly instead.
47
46
FnPtrShim ( DefId , Ty < ' tcx > ) ,
48
47
49
48
/// `<dyn Trait as Trait>::fn`, "direct calls" of which are implicitly
@@ -63,18 +62,16 @@ pub enum InstanceDef<'tcx> {
63
62
/// The `Option<Ty<'tcx>>` is either `Some(T)`, or `None` for empty drop
64
63
/// glue.
65
64
///
66
- /// NB: the type must be monomorphic for MIR shims to work.
67
- // FIXME(eddyb) support generating shims for a "shallow type",
68
- // e.g. `Foo<_>` or `[_]` instead of requiring a fully monomorphic
69
- // `Foo<Bar>` or `[String]` etc.
65
+ /// NB: the type must currently be monomorphic to avoid double substitution
66
+ /// problems with the MIR shim bodies. `Instance::resolve` enforces this.
67
+ // FIXME(#69925) support polymorphic MIR shim bodies properly instead.
70
68
DropGlue ( DefId , Option < Ty < ' tcx > > ) ,
71
69
72
70
///`<T as Clone>::clone` shim.
73
71
///
74
- /// NB: the type must be monomorphic for MIR shims to work.
75
- // FIXME(eddyb) support generating shims for a "shallow type",
76
- // e.g. `Foo<_>` or `[_]` instead of requiring a fully monomorphic
77
- // `Foo<Bar>` or `[String]` etc.
72
+ /// NB: the type must currently be monomorphic to avoid double substitution
73
+ /// problems with the MIR shim bodies. `Instance::resolve` enforces this.
74
+ // FIXME(#69925) support polymorphic MIR shim bodies properly instead.
78
75
CloneShim ( DefId , Ty < ' tcx > ) ,
79
76
}
80
77
0 commit comments