Clarification of borrowck (#354)

pull/367/head
Arthur Milchior 2 years ago committed by GitHub
parent 7284d09164
commit 09044272ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,10 +1,10 @@
# Splitting Borrows # Splitting Borrows
The mutual exclusion property of mutable references can be very limiting when The mutual exclusion property of mutable references can be very limiting when
working with a composite structure. The borrow checker understands some basic working with a composite structure. The borrow checker (a.k.a. borrowck)
stuff, but will fall over pretty easily. It does understand structs understands some basic stuff, but will fall over pretty easily. It does
sufficiently to know that it's possible to borrow disjoint fields of a struct understand structs sufficiently to know that it's possible to borrow disjoint
simultaneously. So this works today: fields of a struct simultaneously. So this works today:
```rust ```rust
struct Foo { struct Foo {

Loading…
Cancel
Save