Skip to content
This repository was archived by the owner on Apr 5, 2024. It is now read-only.

Commit afc6c65

Browse files
Make rules around adding public fields in struct with private fields more flexible
1 parent 7dcda36 commit afc6c65

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/changes.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,8 +381,7 @@ impl<'tcx> ChangeType<'tcx> {
381381
TypeParameterRemoved { .. } |
382382
VariantAdded |
383383
VariantRemoved |
384-
VariantFieldAdded { public: true, .. } |
385-
VariantFieldAdded { public: false, total_public: true, .. } |
384+
VariantFieldAdded { total_public: true, .. } |
386385
VariantFieldRemoved { public: true, .. } |
387386
VariantFieldRemoved { public: false, is_enum: true, .. } |
388387
VariantStyleChanged { .. } |
@@ -397,12 +396,19 @@ impl<'tcx> ChangeType<'tcx> {
397396
TraitImplTightened |
398397
AssociatedItemRemoved |
399398
Unknown => Breaking,
399+
//
400+
// Technically breaking
401+
//
400402
MethodSelfChanged { now_self: true } |
401403
TraitItemAdded { .. } | // either defaulted or sealed
402404
BoundsLoosened { trait_def: false, .. } |
403405
TraitImplLoosened |
404406
AssociatedItemAdded |
407+
VariantFieldAdded { public: true, .. } |
405408
ItemMadePublic => TechnicallyBreaking,
409+
//
410+
// Non breaking
411+
//
406412
StaticMutabilityChanged { now_mut: true } |
407413
VarianceLoosened |
408414
TypeParameterAdded { defaulted: true } |

0 commit comments

Comments
 (0)