@@ -19,12 +19,12 @@ use rustc_middle::middle::privacy::Level;
1919use rustc_middle:: query:: Providers ;
2020use rustc_middle:: ty:: { self , AssocTag , TyCtxt } ;
2121use rustc_middle:: { bug, span_bug} ;
22- use rustc_session:: lint:: builtin:: { DEAD_CODE , UNCONSTRUCTIBLE_PUB_STRUCT } ;
22+ use rustc_session:: lint:: builtin:: { DEAD_CODE , UNCONSTRUCTABLE_PUB_STRUCT } ;
2323use rustc_session:: lint:: { self , LintExpectationId } ;
2424use rustc_span:: { Symbol , kw, sym} ;
2525
2626use crate :: errors:: {
27- ChangeFields , IgnoredDerivedImpls , MultipleDeadCodes , ParentInfo , UnconstructiblePubStruct ,
27+ ChangeFields , IgnoredDerivedImpls , MultipleDeadCodes , ParentInfo , UnconstructablePubStruct ,
2828 UselessAssignment ,
2929} ;
3030
@@ -772,9 +772,9 @@ impl<'tcx> Visitor<'tcx> for MarkSymbolVisitor<'tcx> {
772772 }
773773}
774774
775- fn has_allow_unconstructible_pub_struct ( tcx : TyCtxt < ' _ > , def_id : LocalDefId ) -> bool {
775+ fn has_allow_unconstructable_pub_struct ( tcx : TyCtxt < ' _ > , def_id : LocalDefId ) -> bool {
776776 let hir_id = tcx. local_def_id_to_hir_id ( def_id) ;
777- let lint_level = tcx. lint_level_at_node ( UNCONSTRUCTIBLE_PUB_STRUCT , hir_id) . level ;
777+ let lint_level = tcx. lint_level_at_node ( UNCONSTRUCTABLE_PUB_STRUCT , hir_id) . level ;
778778 matches ! ( lint_level, lint:: Allow | lint:: Expect )
779779}
780780
@@ -912,12 +912,12 @@ fn create_and_seed_worklist(
912912 true ,
913913 ) ,
914914 DefKind :: Struct => (
915- has_allow_unconstructible_pub_struct ( tcx, * id)
915+ has_allow_unconstructable_pub_struct ( tcx, * id)
916916 || struct_can_be_constructed_directly ( tcx, * id) ,
917917 false ,
918918 ) ,
919919 DefKind :: Ctor ( CtorOf :: Struct , CtorKind :: Fn ) => (
920- has_allow_unconstructible_pub_struct ( tcx, tcx. local_parent ( * id) )
920+ has_allow_unconstructable_pub_struct ( tcx, tcx. local_parent ( * id) )
921921 || struct_can_be_constructed_directly ( tcx, tcx. local_parent ( * id) ) ,
922922 false ,
923923 ) ,
@@ -1380,8 +1380,8 @@ fn check_mod_deathness(tcx: TyCtxt<'_>, module: LocalModDefId) {
13801380
13811381 let hir_id = tcx. local_def_id_to_hir_id ( def_id) ;
13821382 let vis_span = tcx. hir_node ( hir_id) . expect_item ( ) . vis_span ;
1383- let diag = UnconstructiblePubStruct { name, vis_span } ;
1384- tcx. emit_node_span_lint ( UNCONSTRUCTIBLE_PUB_STRUCT , hir_id, tcx. hir_span ( hir_id) , diag) ;
1383+ let diag = UnconstructablePubStruct { name, vis_span } ;
1384+ tcx. emit_node_span_lint ( UNCONSTRUCTABLE_PUB_STRUCT , hir_id, tcx. hir_span ( hir_id) , diag) ;
13851385 }
13861386}
13871387
0 commit comments