]> git.lizzy.rs Git - rust.git/commitdiff
correcting another mistake in an example
authorGAJaloyan <georges-axel.jaloyan@ens.fr>
Mon, 27 Mar 2017 14:17:08 +0000 (16:17 +0200)
committerGitHub <noreply@github.com>
Mon, 27 Mar 2017 14:17:08 +0000 (16:17 +0200)
copy_pointer -> copy_borrowed_ptr

src/librustc_borrowck/borrowck/README.md

index 29b007a7499c3115fd568313da5940e7d098d7b8..034b7cbadd9c64a20cde15f215d00d01ac4be3cb 100644 (file)
@@ -633,7 +633,7 @@ Here is a concrete example of a bug this rule prevents:
 
 ```rust
 // Test region-reborrow-from-shorter-mut-ref.rs:
-fn copy_pointer<'a,'b,T>(x: &'a mut &'b mut T) -> &'b mut T {
+fn copy_borrowed_ptr<'a,'b,T>(x: &'a mut &'b mut T) -> &'b mut T {
     &mut **p // ERROR due to clause (1)
 }
 fn main() {