File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/librustc_borrowck/borrowck Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff 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
352352Immutable pointer types like ` &T ` are aliasable, and hence can only be
353353borrowed 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}
639639fn main () {
You can’t perform that action at this time.
0 commit comments