You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gccrs: Refactor HIR::PatternItem class and its derivatives
Renames HIR::TupleItems to PatternItems for better generalization because it will be reused for
SlicePattern in the future. Enum values MULTIPLE/RANGED are renamed to NO_REST/HAS_REST
to reduce misleadingness as it is completely different and separate from the ranged values `..`
representation. This results in renaming of all related classes and updates to all code that
references them.
gcc/rust/ChangeLog:
* hir/tree/rust-hir-pattern.h:
- Rename TupleItems to PatternItems.
- Rename TuplePatternItemsMultiple/Ranged & TupleStructItemsRange/NoRange to
TuplePatternItemsNoRest/HasRest and TupleStructItemsNoRest/HasRest.
- Update enum values to NO_REST/HAS_REST.
- Rename clone_tuple_items_impl to clone_pattern_items_impl.
* hir/tree/rust-hir-full-decls.h: Renamed the classes accordingly.
* hir/tree/rust-hir-visitor.h: Renamed the classes accordingly.
* hir/tree/rust-hir-visitor.cc: Renamed the classes accordingly.
* hir/rust-hir-dump.h: Renamed the classes accordingly.
* hir/rust-hir-dump.cc: Renamed the classes accordingly.
* hir/tree/rust-hir.cc: Renamed the classes accordingly.
* hir/rust-ast-lower-base.cc: Renamed the classes accordingly.
* hir/rust-ast-lower-pattern.cc: Renamed the classes accordingly.
* backend/rust-compile-pattern.cc: Renamed the classes accordingly.
* backend/rust-compile-var-decl.h: Renamed the classes accordingly.
* checks/errors/borrowck/rust-bir-builder-pattern.cc: Renamed the classes accordingly.
* checks/errors/borrowck/rust-bir-builder-struct.h: Renamed the classes accordingly.
* checks/errors/borrowck/rust-function-collector.h: Renamed the classes accordingly.
* checks/errors/rust-const-checker.cc: Renamed the classes accordingly.
* checks/errors/rust-const-checker.h: Renamed the classes accordingly.
* checks/errors/rust-hir-pattern-analysis.cc: Renamed the classes accordingly.
* checks/errors/rust-hir-pattern-analysis.h: Renamed the classes accordingly.
* checks/errors/rust-unsafe-checker.cc: Renamed the classes accordingly.
* checks/errors/rust-unsafe-checker.h: Renamed the classes accordingly.
* checks/errors/rust-readonly-check2.cc: Renamed the classes accordingly.
* typecheck/rust-hir-type-check-pattern.cc: Update references to renamed classes and enum
values.
Signed-off-by: Yap Zhi Heng <yapzhhg@gmail.com>
0 commit comments