fn check_field(&mut self, span: Span, def: &'tcx ty::AdtDef, field: &'tcx ty::FieldDef) {
        if !def.is_enum() && !field.vis.is_accessible_from(self.current_item, self.tcx) {
            struct_span_err!(self.tcx.sess, span, E0451, "field `{}` of {} `{}` is private",
                             field.name, def.variant_descr(), self.tcx.item_path_str(def.did))
                .span_label(span, format!("field `{}` is private", field.name))
                .emit();
        }
    }
// Checks that a field is accessible.
Checks that a field is accessible.
Checks that a field is accessible .
fn check_field(&mut self, span: Span, def: &'tcx ty::AdtDef, field: &'tcx ty::FieldDef) {
        if !def.is_enum() && !field.vis.is_accessible_from(self.current_item, self.tcx) {
            struct_span_err!(self.tcx.sess, span, E0451, "field `{}` of {} `{}` is private",
                             field.name, def.variant_descr(), self.tcx.item_path_str(def.did))
                .span_label(span, format!("field `{}` is private", field.name))
                .emit();
        }
    }
fn check_field ( & mut self , span : Span , def : & ' tcx ty :: AdtDef , field : & ' tcx ty :: FieldDef ) { if ! def . is_enum ( ) && ! field . vis . is_accessible_from ( self . current_item , self . tcx ) { struct_span_err ! ( self tcx sess span E0451 " " field name def variant_descr ( ) self tcx item_path_str ( def did ) ) . span_label ( span , format ! ( " " field name ) ) . emit ( ) ; } }
Checks that a field is accessible.
Checks that a field is accessible .
&mut self
span
Span
def
&'tcx ty::AdtDef
field
&'tcx ty::FieldDef
&mut self
span
Span
def
&'tcx ty::AdtDef
field
&'tcx ty::FieldDef