Skip to content

Commit 1f92f0c

Browse files
author
Keegan McAllister
committed
---
yaml --- r: 187133 b: refs/heads/try c: 0c1fc1c h: refs/heads/master i: 187131: 552869e v: v3
1 parent ac49c34 commit 1f92f0c

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: b4c965ee803a4521d8b4575f634e036f93e408f3
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 3a96d6a9818fe2affc98a187fb1065120458cee9
5-
refs/heads/try: bb22c100db4b9f2c11aa0dbb78a5728087190dc6
5+
refs/heads/try: 0c1fc1ca7b3b4c67e362e89e4cec33854d1e7de6
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/src/librustc_borrowck/borrowck/README.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -261,12 +261,11 @@ that will go into the final loan. We'll discuss in more detail below.
261261
## Checking mutability
262262

263263
Checking mutability is fairly straightforward. We just want to prevent
264-
immutable data from being borrowed as mutable. Note that it is ok to
265-
borrow mutable data as immutable, since that is simply a
266-
freeze. Formally we define a predicate `MUTABLE(LV, MQ)` which, if
267-
defined, means that "borrowing `LV` with mutability `MQ` is ok. The
268-
Rust code corresponding to this predicate is the function
269-
`check_mutability` in `middle::borrowck::gather_loans`.
264+
immutable data from being borrowed as mutable. Note that it is ok to borrow
265+
mutable data as immutable, since that is simply a freeze. The judgement
266+
`MUTABILITY(LV, MQ)` means the mutability of `LV` is compatible with a borrow
267+
of mutability `MQ`. The Rust code corresponding to this predicate is the
268+
function `check_mutability` in `middle::borrowck::gather_loans`.
270269

271270
### Checking mutability of variables
272271

@@ -321,12 +320,11 @@ MUTABILITY(*LV, MQ) // M-Deref-Borrowed-Mut
321320

322321
## Checking aliasability
323322

324-
The goal of the aliasability check is to ensure that we never permit
325-
`&mut` borrows of aliasable data. Formally we define a predicate
326-
`ALIASABLE(LV, MQ)` which if defined means that
327-
"borrowing `LV` with mutability `MQ` is ok". The
328-
Rust code corresponding to this predicate is the function
329-
`check_aliasability()` in `middle::borrowck::gather_loans`.
323+
The goal of the aliasability check is to ensure that we never permit `&mut`
324+
borrows of aliasable data. The judgement `ALIASABLE(LV, MQ)` means the
325+
aliasability of `LV` is compatible with a borrow of mutability `MQ`. The Rust
326+
code corresponding to this predicate is the function `check_aliasability()` in
327+
`middle::borrowck::gather_loans`.
330328

331329
### Checking aliasability of variables
332330

0 commit comments

Comments
 (0)