about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src/check/check.rs
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2025-07-26 21:46:20 +0000
committerCamille GILLOT <gillot.camille@gmail.com>2025-07-26 21:53:13 +0000
commit8817572b4595df352e6a7fdd56422fb07cd28d89 (patch)
tree5375a7a84cab2e711becf0bded7836c8381a0b4a /compiler/rustc_hir_analysis/src/check/check.rs
parent7c6496145f86133655a941e0dafd5dfa368514d4 (diff)
downloadrust-8817572b4595df352e6a7fdd56422fb07cd28d89.tar.gz
rust-8817572b4595df352e6a7fdd56422fb07cd28d89.zip
Do not check Sync during type_of.
Diffstat (limited to 'compiler/rustc_hir_analysis/src/check/check.rs')
-rw-r--r--compiler/rustc_hir_analysis/src/check/check.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_hir_analysis/src/check/check.rs b/compiler/rustc_hir_analysis/src/check/check.rs
index 07ca64e6144..f2be2a65716 100644
--- a/compiler/rustc_hir_analysis/src/check/check.rs
+++ b/compiler/rustc_hir_analysis/src/check/check.rs
@@ -767,6 +767,8 @@ pub(crate) fn check_item_type(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Result<(),
                 DefKind::Static { .. } => {
                     check_static_inhabited(tcx, def_id);
                     check_static_linkage(tcx, def_id);
+                    let ty = tcx.type_of(def_id).instantiate_identity();
+                    res = res.and(wfcheck::check_static_item(tcx, def_id, ty, true));
                 }
                 DefKind::Const => res = res.and(wfcheck::check_const_item(tcx, def_id)),
                 _ => unreachable!(),