Rollup merge of #136817 - dianne:clean-and-comment-pat-migration, r=Nadrieril
Pattern Migration 2024: clean up and comment This follows up on #136577 by moving the pattern migration logic to its own module, removing a bit of unnecessary complexity, and adding comments. Since there's quite a bit of pattern migration logic now (and potentially more in #136496), I think it makes sense to keep it separate from THIR construction, at least as much as is convenient. r? ``@Nadrieril``
This commit is contained in:
commit
767ec0a8ad
3 changed files with 205 additions and 114 deletions
|
@ -1112,9 +1112,6 @@ pub(crate) struct Rust2024IncompatiblePatSugg {
|
|||
pub(crate) suggestion: Vec<(Span, String)>,
|
||||
pub(crate) ref_pattern_count: usize,
|
||||
pub(crate) binding_mode_count: usize,
|
||||
/// Internal state: the ref-mutability of the default binding mode at the subpattern being
|
||||
/// lowered, with the span where it was introduced. `None` for a by-value default mode.
|
||||
pub(crate) default_mode_span: Option<(Span, ty::Mutability)>,
|
||||
/// Labels for where incompatibility-causing by-ref default binding modes were introduced.
|
||||
pub(crate) default_mode_labels: FxIndexMap<Span, ty::Mutability>,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue