Skip to content

Commit f6c3469

Browse files
committed
fix new usage of type_of
1 parent 8e92849 commit f6c3469

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/rustc_hir_analysis/src/check/intrinsicck.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ impl<'a, 'tcx> InlineAsmCtxt<'a, 'tcx> {
414414
// Check that sym actually points to a function. Later passes
415415
// depend on this.
416416
hir::InlineAsmOperand::SymFn { anon_const } => {
417-
let ty = self.tcx.type_of(anon_const.def_id);
417+
let ty = self.tcx.type_of(anon_const.def_id).subst_identity();
418418
match ty.kind() {
419419
ty::Never | ty::Error(_) => {}
420420
ty::FnDef(..) => {}

src/librustdoc/passes/collect_intra_doc_links.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1710,7 +1710,7 @@ fn resolution_failure(
17101710
Res::Primitive(_) => None,
17111711
};
17121712
let is_struct_variant = |did| {
1713-
if let ty::Adt(def, _) = tcx.type_of(did).kind()
1713+
if let ty::Adt(def, _) = tcx.type_of(did).subst_identity().kind()
17141714
&& def.is_enum()
17151715
&& let Some(variant) = def.variants().iter().find(|v| v.name == res.name(tcx)) {
17161716
// ctor is `None` if variant is a struct

0 commit comments

Comments
 (0)