Skip to content

Instantly share code, notes, and snippets.

Avatar
👾
emulation + rust

Amjad Alsharafi Amjad50

👾
emulation + rust
View GitHub Profile
@Amjad50
Amjad50 / report.md
Last active Aug 30, 2020
feature(move_ref_pattern) stabilization
View report.md

Implementation

  • Initially the rule was added in the run-up to 1.0. The AST-based borrow checker was having difficulty correctly enforcing match expressions that combined ref and move bindings, and so it was decided to simplify forbid the combination out right.
  • The move to MIR-based borrow checking made it possible to enforce the rules in a finer-grained level, but we kept the rule in place in an effort to be conservative in our changes.
  • In #68376, @Centril lifted the restriction but required a feature-gate.
  • his PR removes the feature-gate.

Tracking issue: #68354.

Description