Skip to content

Commit f6cf3c9

Browse files
committed
---
yaml --- r: 232345 b: refs/heads/try c: 75c6428 h: refs/heads/master i: 232343: 2ae3959 v: v3
1 parent 84277c2 commit f6cf3c9

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: edeb4f1c86cbf6af8ef9874d4b3af50f721ea1b8
33
refs/heads/snap-stage3: 1af31d4974e33027a68126fa5a5a3c2c6491824f
4-
refs/heads/try: 55752a4bdeae5dad77875b7702a14882fd12725b
4+
refs/heads/try: 75c6428e1bf2f5564392276642d962163d8a9809
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/src/librustc_borrowck/diagnostics.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,14 @@ let mut x: i64 = 1;
179179
let mut y: Box<_> = Box::new(&mut x);
180180
**y = 2;
181181
```
182+
183+
It can also be fixed by using a type with interior mutability, such as `Cell` or
184+
`RefCell`:
185+
186+
```
187+
let y: Cell<_> = Cell::new(1);
188+
y.set(2);
189+
```
182190
"##,
183191

184192
E0387: r##"

0 commit comments

Comments
 (0)