Skip to content

Commit 08036a8

Browse files
committed
Address PR comments
1 parent 6515ac9 commit 08036a8

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

compiler/rustc_smir/src/rustc_smir/mod.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,7 @@ impl<'tcx> Tables<'tcx> {
327327

328328
fn has_body(&self, instance: Instance<'tcx>) -> bool {
329329
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)
332331
&& !matches!(
333332
instance.def,
334333
ty::InstanceDef::Virtual(..) | ty::InstanceDef::Intrinsic(..)

compiler/stable_mir/src/mir/mono.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ impl Instance {
6161
with(|cx| cx.resolve_drop_in_place(ty))
6262
}
6363

64-
/// Resolve the drop in place for a given type.
64+
/// Resolve an instance for a given function pointer.
6565
pub fn resolve_for_fn_ptr(def: FnDef, args: &GenericArgs) -> Result<Instance, crate::Error> {
6666
with(|context| {
6767
context.resolve_for_fn_ptr(def, args).ok_or_else(|| {
@@ -70,7 +70,7 @@ impl Instance {
7070
})
7171
}
7272

73-
/// Resolve a closure (do we need kind? -- most cases use FnOnce)
73+
/// Resolve a closure with the expected kind.
7474
pub fn resolve_closure(
7575
def: ClosureDef,
7676
args: &GenericArgs,

0 commit comments

Comments
 (0)