Skip to content

Commit 7b10133

Browse files
committed
Fix some random stuff
1 parent d767ee1 commit 7b10133

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

src/librustc/mir/mod.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -429,8 +429,8 @@ pub enum BorrowKind {
429429

430430
/// Data must be immutable but not aliasable. This kind of borrow
431431
/// cannot currently be expressed by the user and is used only in
432-
/// implicit closure bindings. It is needed when you the closure
433-
/// is borrowing or mutating a mutable referent, e.g.:
432+
/// implicit closure bindings. It is needed when the closure is
433+
/// borrowing or mutating a mutable referent, e.g.:
434434
///
435435
/// let x: &mut isize = ...;
436436
/// let y = || *x += 5;
@@ -443,7 +443,7 @@ pub enum BorrowKind {
443443
/// let y = (&mut Env { &x }, fn_ptr); // Closure is pair of env and fn
444444
/// fn fn_ptr(env: &mut Env) { **env.x += 5; }
445445
///
446-
/// This is then illegal because you cannot mutate a `&mut` found
446+
/// This is then illegal because you cannot mutate an `&mut` found
447447
/// in an aliasable location. To solve, you'd have to translate with
448448
/// an `&mut` borrow:
449449
///
@@ -673,7 +673,7 @@ pub struct LocalDecl<'tcx> {
673673
/// ROOT SCOPE
674674
/// │{ argument x: &str }
675675
/// │
676-
/// │ │{ #[allow(unused_mut] } // this is actually split into 2 scopes
676+
/// │ │{ #[allow(unused_mut)] } // this is actually split into 2 scopes
677677
/// │ │ // in practice because I'm lazy.
678678
/// │ │
679679
/// │ │← x.source_info.scope
@@ -906,7 +906,7 @@ pub enum TerminatorKind<'tcx> {
906906

907907
/// Drop the Place and assign the new value over it. This ensures
908908
/// that the assignment to `P` occurs *even if* the destructor for
909-
/// place unwinds. Its semantics are best explained by by the
909+
/// place unwinds. Its semantics are best explained by the
910910
/// elaboration:
911911
///
912912
/// ```

src/librustc_mir/borrow_check/move_errors.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ impl<'a, 'gcx, 'tcx> MirBorrowckCtxt<'a, 'gcx, 'tcx> {
155155
statement_span: Span,
156156
) {
157157
debug!(
158-
"append_to_grouped_errors(match_place={:?}, match_span={:?})",
158+
"append_binding_error(match_place={:?}, match_span={:?})",
159159
match_place, match_span
160160
);
161161

src/librustc_mir/build/matches/mod.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -321,9 +321,10 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
321321
block.unit()
322322
}
323323

324-
/// Declares the bindings of the given pattern and returns the visibility scope
325-
/// for the bindings in this patterns, if such a scope had to be created.
326-
/// NOTE: Declaring the bindings should always be done in their drop scope.
324+
/// Declares the bindings of the given patterns and returns the visibility
325+
/// scope for the bindings in these patterns, if such a scope had to be
326+
/// created. NOTE: Declaring the bindings should always be done in their
327+
/// drop scope.
327328
pub fn declare_bindings(&mut self,
328329
mut visibility_scope: Option<SourceScope>,
329330
scope_span: Span,

0 commit comments

Comments
 (0)