Skip to content

Commit c749a77

Browse files
authored
Rollup merge of rust-lang#40797 - GAJaloyan:patch-1, r=arielb1
Correcting mistakes in the README.md Correcting the two mistakes in the README.md (issue rust-lang#40793)
2 parents fac4941 + c80868e commit c749a77

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/librustc_borrowck/borrowck/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ ALIASABLE(*LV, MQ) // M-Deref-Unique
347347
ALIASABLE(LV, MQ)
348348
```
349349

350-
### Checking mutability of immutable pointer types
350+
### Checking aliasability of immutable pointer types
351351

352352
Immutable pointer types like `&T` are aliasable, and hence can only be
353353
borrowed immutably:
@@ -357,7 +357,7 @@ ALIASABLE(*LV, imm) // M-Deref-Borrowed-Imm
357357
TYPE(LV) = &Ty
358358
```
359359

360-
### Checking mutability of mutable pointer types
360+
### Checking aliasability of mutable pointer types
361361

362362
`&mut T` can be frozen, so it is acceptable to borrow it as either imm or mut:
363363

@@ -633,7 +633,7 @@ Here is a concrete example of a bug this rule prevents:
633633

634634
```rust
635635
// Test region-reborrow-from-shorter-mut-ref.rs:
636-
fn copy_pointer<'a,'b,T>(x: &'a mut &'b mut T) -> &'b mut T {
636+
fn copy_borrowed_ptr<'a,'b,T>(x: &'a mut &'b mut T) -> &'b mut T {
637637
&mut **p // ERROR due to clause (1)
638638
}
639639
fn main() {

0 commit comments

Comments
 (0)