Fix fairer example

This commit is contained in:
Jules Bertholet 2024-05-16 23:19:22 -04:00
parent c2bdf38088
commit 04501bc53a
No known key found for this signature in database
GPG Key ID: 32034DAFC38C1BFC
1 changed files with 5 additions and 1 deletions

View File

@ -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
```