diff options
| author | Kyle Matsuda <kyle.yoshio.matsuda@gmail.com> | 2023-02-07 01:29:48 -0700 |
|---|---|---|
| committer | Kyle Matsuda <kyle.yoshio.matsuda@gmail.com> | 2023-02-16 17:05:56 -0700 |
| commit | c183110cc26abb506dba0a4def917735fb6eb6f0 (patch) | |
| tree | 5f4a6764ed381c957728b9b11341f58eff93686b /compiler/rustc_hir_analysis/src/lib.rs | |
| parent | d822b97a27e50f5a091d2918f6ff0ffd2d2827f5 (diff) | |
| download | rust-c183110cc26abb506dba0a4def917735fb6eb6f0.tar.gz rust-c183110cc26abb506dba0a4def917735fb6eb6f0.zip | |
remove bound_type_of query; make type_of return EarlyBinder; change type_of in metadata
Diffstat (limited to 'compiler/rustc_hir_analysis/src/lib.rs')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_hir_analysis/src/lib.rs b/compiler/rustc_hir_analysis/src/lib.rs index 21c3870f850..6111046a519 100644 --- a/compiler/rustc_hir_analysis/src/lib.rs +++ b/compiler/rustc_hir_analysis/src/lib.rs @@ -187,7 +187,7 @@ fn check_main_fn_ty(tcx: TyCtxt<'_>, main_def_id: DefId) { fn main_fn_diagnostics_def_id(tcx: TyCtxt<'_>, def_id: DefId, sp: Span) -> LocalDefId { if let Some(local_def_id) = def_id.as_local() { - let hir_type = tcx.bound_type_of(local_def_id).subst_identity(); + let hir_type = tcx.type_of(local_def_id).subst_identity(); if !matches!(hir_type.kind(), ty::FnDef(..)) { span_bug!(sp, "main has a non-function type: found `{}`", hir_type); } @@ -366,7 +366,7 @@ fn check_start_fn_ty(tcx: TyCtxt<'_>, start_def_id: DefId) { let start_def_id = start_def_id.expect_local(); let start_id = tcx.hir().local_def_id_to_hir_id(start_def_id); let start_span = tcx.def_span(start_def_id); - let start_t = tcx.bound_type_of(start_def_id).subst_identity(); + let start_t = tcx.type_of(start_def_id).subst_identity(); match start_t.kind() { ty::FnDef(..) => { if let Some(Node::Item(it)) = tcx.hir().find(start_id) { |
