]> git.lizzy.rs Git - rust.git/commitdiff
Fix some random stuff
authorashtneoi <ashtneoi@gmail.com>
Thu, 2 Aug 2018 06:53:28 +0000 (23:53 -0700)
committerashtneoi <ashtneoi@gmail.com>
Wed, 15 Aug 2018 22:10:43 +0000 (15:10 -0700)
src/librustc/mir/mod.rs
src/librustc_mir/borrow_check/move_errors.rs
src/librustc_mir/build/matches/mod.rs

index dae5709ba114a3721f86bdb41ee2fcb9ae1594e7..6b9cd2956216f80716b0660f3f9fdab28f10134c 100644 (file)
@@ -429,8 +429,8 @@ pub enum BorrowKind {
 
     /// Data must be immutable but not aliasable.  This kind of borrow
     /// cannot currently be expressed by the user and is used only in
-    /// implicit closure bindings. It is needed when you the closure
-    /// is borrowing or mutating a mutable referent, e.g.:
+    /// implicit closure bindings. It is needed when the closure is
+    /// borrowing or mutating a mutable referent, e.g.:
     ///
     ///    let x: &mut isize = ...;
     ///    let y = || *x += 5;
@@ -443,7 +443,7 @@ pub enum BorrowKind {
     ///    let y = (&mut Env { &x }, fn_ptr);  // Closure is pair of env and fn
     ///    fn fn_ptr(env: &mut Env) { **env.x += 5; }
     ///
-    /// This is then illegal because you cannot mutate a `&mut` found
+    /// This is then illegal because you cannot mutate an `&mut` found
     /// in an aliasable location. To solve, you'd have to translate with
     /// an `&mut` borrow:
     ///
@@ -673,7 +673,7 @@ pub struct LocalDecl<'tcx> {
     /// ROOT SCOPE
     ///  │{ argument x: &str }
     ///  │
-    ///  │ │{ #[allow(unused_mut] } // this is actually split into 2 scopes
+    ///  │ │{ #[allow(unused_mut)] } // this is actually split into 2 scopes
     ///  │ │                        // in practice because I'm lazy.
     ///  │ │
     ///  │ │← x.source_info.scope
@@ -906,7 +906,7 @@ pub enum TerminatorKind<'tcx> {
 
     /// Drop the Place and assign the new value over it. This ensures
     /// that the assignment to `P` occurs *even if* the destructor for
-    /// place unwinds. Its semantics are best explained by by the
+    /// place unwinds. Its semantics are best explained by the
     /// elaboration:
     ///
     /// ```
index d3524e841b223d93d3b927a149ce006a84d5efdb..5bbedbcfeee4e5efd9390b06f0c43efa21218284 100644 (file)
@@ -155,7 +155,7 @@ fn append_binding_error(
         statement_span: Span,
     ) {
         debug!(
-            "append_to_grouped_errors(match_place={:?}, match_span={:?})",
+            "append_binding_error(match_place={:?}, match_span={:?})",
             match_place, match_span
         );
 
index 6b6ec749bcbe6efd1124d6f529264564a4aab661..ebf9631831c88d76ccd4e063f40551a3ecccb5ee 100644 (file)
@@ -321,9 +321,10 @@ pub fn place_into_pattern(&mut self,
         block.unit()
     }
 
-    /// Declares the bindings of the given pattern and returns the visibility scope
-    /// for the bindings in this patterns, if such a scope had to be created.
-    /// NOTE: Declaring the bindings should always be done in their drop scope.
+    /// Declares the bindings of the given patterns and returns the visibility
+    /// scope for the bindings in these patterns, if such a scope had to be
+    /// created. NOTE: Declaring the bindings should always be done in their
+    /// drop scope.
     pub fn declare_bindings(&mut self,
                             mut visibility_scope: Option<SourceScope>,
                             scope_span: Span,