You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* An [identifier pattern] that binds by reference or mutable reference.
414
-
* A [struct][struct pattern], [tuple][tuple pattern], [tuple struct][tuple
415
-
struct pattern], or [slice][slice pattern] pattern where at least one of the
416
-
direct subpatterns is an extending pattern.
417
414
418
-
So `ref x`, `V(ref x)` and `[ref x, y]` are all extending patterns, but `x`,
419
-
`&ref x` and `&(ref x,)` are not.
415
+
```rust
416
+
# fntemp() {}
417
+
letrefx=temp(); // Binds by reference.
418
+
# x;
419
+
letrefmutx=temp(); // Binds by mutable reference.
420
+
# x;
421
+
```
422
+
423
+
* A [struct][struct pattern], [tuple][tuple pattern], [tuple struct][tuple struct pattern], [slice][slice pattern], or [or-pattern][or-patterns] where at least one of the direct subpatterns is an extending pattern.
0 commit comments