Skip to content

Commit f041966

Browse files
committed
fix import nit for long diagnostics on E0387
1 parent 78d2833 commit f041966

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/librustc_borrowck/diagnostics.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,10 @@ interior mutability through a shared reference. Our example's `mutable` function
138138
could be redefined as below:
139139
140140
```
141+
use std::cell::Cell;
142+
141143
fn mutable() {
142-
let x = std::cell::Cell::new(0u32);
144+
let x = Cell::new(0u32);
143145
foo(|| x.set(2));
144146
}
145147
```

0 commit comments

Comments
 (0)