about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlisdair Owens <awo101@zepler.net>2015-08-10 20:35:27 +0100
committerAlisdair Owens <awo101@zepler.net>2015-08-10 20:35:27 +0100
commitf0419661f0d27f5662f03359ebf0091a4ac7b7b2 (patch)
treebbc416595d256ab3069e9d2f0ea089996fb98680
parent78d28336feb9f46ac5929023f45acdbb3f3379e5 (diff)
downloadrust-f0419661f0d27f5662f03359ebf0091a4ac7b7b2.tar.gz
rust-f0419661f0d27f5662f03359ebf0091a4ac7b7b2.zip
fix import nit for long diagnostics on E0387
-rw-r--r--src/librustc_borrowck/diagnostics.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/librustc_borrowck/diagnostics.rs b/src/librustc_borrowck/diagnostics.rs
index b641dfd7d40..78a8ab9cee0 100644
--- a/src/librustc_borrowck/diagnostics.rs
+++ b/src/librustc_borrowck/diagnostics.rs
@@ -138,8 +138,10 @@ interior mutability through a shared reference. Our example's `mutable` function
 could be redefined as below:
 
 ```
+use std::cell::Cell;
+
 fn mutable() {
-    let x = std::cell::Cell::new(0u32);
+    let x = Cell::new(0u32);
     foo(|| x.set(2));
 }
 ```