Skip to content

Commit

Permalink
Fix fairer example
Browse files Browse the repository at this point in the history
  • Loading branch information
Jules-Bertholet committed May 17, 2024
1 parent c2bdf38 commit 04501bc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion text/3627-match-ergonomics-2024.md
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,12 @@ let &(i, j, [s]) = &(63, 42, &mut [String::from("🦀")]); // i: i32, j: i32, s:
```

```rust
//! All editions: works with or without this rule (alternative to above)
//! Edition ≥ 2024: works with or without this rule (alternative to above)
let (&i, &j, [s]) = &(42, &mut [String::from("🦀")]); // i: i32, j: i32, s: &String
```

```rust
//! All editions: works with or without this rule (alternatives to above)
let &(i, j, [ref s]) = &(42, &mut [String::from("🦀")]); // i: i32, j: i32, s: &String
let &(i, j, &mut [ref s]) = &(42, &mut [String::from("🦀")]); // i: i32, j: i32, s: &String
```
Expand Down

0 comments on commit 04501bc

Please sign in to comment.