Skip to content

Commit

Permalink
Check ctor for missing stability
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors committed Aug 12, 2022
1 parent b821ce6 commit 6925f41
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions compiler/rustc_passes/src/stability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,9 @@ impl<'tcx> Visitor<'tcx> for MissingStabilityAnnotations<'tcx> {

fn visit_variant(&mut self, var: &'tcx Variant<'tcx>) {
self.check_missing_stability(self.tcx.hir().local_def_id(var.id), var.span);
if let Some(ctor_hir_id) = var.data.ctor_hir_id() {
self.check_missing_stability(self.tcx.hir().local_def_id(ctor_hir_id), var.span);
}
intravisit::walk_variant(self, var);
}

Expand Down

0 comments on commit 6925f41

Please sign in to comment.