about summary refs log tree commit diff
path: root/src/doc/rustc-dev-guide
diff options
context:
space:
mode:
authorMark Mansi <markm@cs.wisc.edu>2019-06-15 16:54:08 -0500
committerWho? Me?! <mark-i-m@users.noreply.github.com>2019-06-15 16:57:18 -0500
commitb10dac3953cafdf1448bcdeade73d15543bdb17b (patch)
tree006c8baa2129481b694001d8e44529be1a40c9cf /src/doc/rustc-dev-guide
parente6c3362e9097235a5eb75a65e9b4c6da2965de71 (diff)
fix ci failures, typos, broken links
Diffstat (limited to 'src/doc/rustc-dev-guide')
-rw-r--r--src/doc/rustc-dev-guide/src/borrow_check/two_phase_borrows.md2
-rw-r--r--src/doc/rustc-dev-guide/src/closure.md6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/doc/rustc-dev-guide/src/borrow_check/two_phase_borrows.md b/src/doc/rustc-dev-guide/src/borrow_check/two_phase_borrows.md
index 753ffa5b286..09e7fbefe5f 100644
--- a/src/doc/rustc-dev-guide/src/borrow_check/two_phase_borrows.md
+++ b/src/doc/rustc-dev-guide/src/borrow_check/two_phase_borrows.md
@@ -15,7 +15,7 @@ two-phase borrow are:
 
 To give some examples:
 
-```rust
+```rust2018
 // In the source code
 
 // Case 1:
diff --git a/src/doc/rustc-dev-guide/src/closure.md b/src/doc/rustc-dev-guide/src/closure.md
index a31893b0aca..77f2b42c346 100644
--- a/src/doc/rustc-dev-guide/src/closure.md
+++ b/src/doc/rustc-dev-guide/src/closure.md
@@ -115,9 +115,9 @@ Let's start with defining a term that we will be using quite a bit in the rest o
 *upvar*. An **upvar** is a variable that is local to the function where the closure is defined. So,
 in the above examples, **x** will be an upvar to the closure. They are also sometimes referred to as
 the *free variables* meaning they are not bound to the context of the closure.
-[`src/librustc/ty/query/mod.rs`][freevars] defines a query called *freevars* for this purpose.
+[`src/librustc/ty/query/mod.rs`][upvars] defines a query called *upvars* for this purpose.
 
-[freevars]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc/ty/query/queries/struct.freevars.html
+[upvars]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc/ty/query/queries/struct.upvars.html
 
 Other than lazy invocation, one other thing that the distinguishes a closure from a
 normal function is that it can use the upvars. It borrows these upvars from its surrounding
@@ -167,7 +167,7 @@ invokes a callbackfor each upvar that is borrowed, mutated, or moved.
 
 ```rust
 fn main() {
-    let x = vec![21];
+    let mut x = vec![21];
     let _cl = || {
         let y = x[0];  // 1.
         x[0] += 1;  // 2.