From 9f7baedc62bdad979e1b32a3a645fc2546259b30 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Mon, 9 Dec 2013 12:45:13 -0500 Subject: [PATCH] Address nits for PR for #9629 --- src/librustc/middle/borrowck/doc.rs | 2 +- src/librustc/middle/borrowck/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/librustc/middle/borrowck/doc.rs b/src/librustc/middle/borrowck/doc.rs index 768d1dbb803a2..3bc725c355d34 100644 --- a/src/librustc/middle/borrowck/doc.rs +++ b/src/librustc/middle/borrowck/doc.rs @@ -650,7 +650,7 @@ The rule for mutable borrowed pointers is as follows: Let's examine the two numbered clauses: -Clause (1) specifies that tThe lifetime of the loan (`LT`) cannot +Clause (1) specifies that the lifetime of the loan (`LT`) cannot exceed the lifetime of the `&mut` pointer (`LT'`). The reason for this is that the `&mut` pointer is guaranteed to be the only legal way to mutate its referent -- but only for the lifetime `LT'`. After that diff --git a/src/librustc/middle/borrowck/mod.rs b/src/librustc/middle/borrowck/mod.rs index 044d7d566ab8e..7283374936167 100644 --- a/src/librustc/middle/borrowck/mod.rs +++ b/src/librustc/middle/borrowck/mod.rs @@ -671,7 +671,7 @@ impl BorrowckCtxt { // supposed to be going away. format!("unsafe borrow of aliasable, const value") } - err_borrowed_pointer_too_short(_, _, r) => { + err_borrowed_pointer_too_short(..) => { let descr = match opt_loan_path(err.cmt) { Some(lp) => format!("`{}`", self.loan_path_to_str(lp)), None => self.cmt_to_str(err.cmt),