Skip to content

Commit 1765afc

Browse files
committed
DefKind::Static is now struct variant instead of tuple variant
1 parent 486a51f commit 1765afc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/mir.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ impl<'tcx> AnalysisCtxt<'tcx> {
186186
let def_kind = self.def_kind(did);
187187
match def_kind {
188188
DefKind::Const
189-
| DefKind::Static(..)
189+
| DefKind::Static { .. }
190190
| DefKind::AssocConst
191191
| DefKind::Ctor(..)
192192
| DefKind::AnonConst

src/monomorphize_collector.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ pub fn should_codegen_locally<'tcx>(tcx: TyCtxt<'tcx>, instance: &Instance<'tcx>
776776
return false;
777777
}
778778

779-
if let DefKind::Static(_) = tcx.def_kind(def_id) {
779+
if let DefKind::Static { .. } = tcx.def_kind(def_id) {
780780
// We cannot monomorphize statics from upstream crates.
781781
return false;
782782
}
@@ -982,7 +982,7 @@ impl<'v> RootCollector<'_, 'v> {
982982
);
983983
self.output.push(dummy_spanned(MonoItem::GlobalAsm(id)));
984984
}
985-
DefKind::Static(..) => {
985+
DefKind::Static { .. } => {
986986
debug!(
987987
"RootCollector: ItemKind::Static({})",
988988
self.tcx.def_path_str(id.owner_id.to_def_id())

0 commit comments

Comments
 (0)