File tree 2 files changed +3
-4
lines changed
rustc_smir/src/rustc_smir
2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -327,8 +327,7 @@ impl<'tcx> Tables<'tcx> {
327
327
328
328
fn has_body ( & self , instance : Instance < ' tcx > ) -> bool {
329
329
let def_id = instance. def_id ( ) ;
330
- !self . tcx . is_foreign_item ( def_id)
331
- && self . tcx . is_mir_available ( def_id)
330
+ self . tcx . is_mir_available ( def_id)
332
331
&& !matches ! (
333
332
instance. def,
334
333
ty:: InstanceDef :: Virtual ( ..) | ty:: InstanceDef :: Intrinsic ( ..)
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ impl Instance {
61
61
with ( |cx| cx. resolve_drop_in_place ( ty) )
62
62
}
63
63
64
- /// Resolve the drop in place for a given type .
64
+ /// Resolve an instance for a given function pointer .
65
65
pub fn resolve_for_fn_ptr ( def : FnDef , args : & GenericArgs ) -> Result < Instance , crate :: Error > {
66
66
with ( |context| {
67
67
context. resolve_for_fn_ptr ( def, args) . ok_or_else ( || {
@@ -70,7 +70,7 @@ impl Instance {
70
70
} )
71
71
}
72
72
73
- /// Resolve a closure (do we need kind? -- most cases use FnOnce)
73
+ /// Resolve a closure with the expected kind.
74
74
pub fn resolve_closure (
75
75
def : ClosureDef ,
76
76
args : & GenericArgs ,
You can’t perform that action at this time.
0 commit comments