Skip to content

Commit e222363

Browse files
Add comment to new example
1 parent 1d1d1f4 commit e222363

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

text/3627-match-ergonomics-2024.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,10 @@ would break:
313313

314314
```rust
315315
let &[[&mut a]] = &[&mut [42]];
316+
// `&mut` in pattern needs to match against either:
317+
// - `&mut` in value at same position (there is none, so not possible)
318+
// - inherited `&mut` (which the "never set default binding mode to `ref mut` behind `&`" rule
319+
// downgrades to `&`)
316320
```
317321

318322
Therefore, we *cannot* delay a decision on this matter.

0 commit comments

Comments
 (0)