File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -875,7 +875,8 @@ x = Foo { a: 2 };
875
875
876
876
E0384 : r##"
877
877
This error occurs when an attempt is made to reassign an immutable variable.
878
- For example:
878
+
879
+ Erroneous code example:
879
880
880
881
```compile_fail,E0384
881
882
fn main() {
@@ -895,13 +896,15 @@ fn main() {
895
896
```
896
897
"## ,
897
898
898
- /*E0386: r##"
899
+ E0386 : r##"
900
+ #### Note: this error code is no longer emitted by the compiler.
901
+
899
902
This error occurs when an attempt is made to mutate the target of a mutable
900
903
reference stored inside an immutable container.
901
904
902
905
For example, this can happen when storing a `&mut` inside an immutable `Box`:
903
906
904
- ```compile_fail,E0386
907
+ ```
905
908
let mut x: i64 = 1;
906
909
let y: Box<_> = Box::new(&mut x);
907
910
**y = 2; // error, cannot assign to data in an immutable container
@@ -925,7 +928,7 @@ let x: i64 = 1;
925
928
let y: Box<Cell<_>> = Box::new(Cell::new(x));
926
929
y.set(2);
927
930
```
928
- "##,*/
931
+ "## ,
929
932
930
933
E0387 : r##"
931
934
#### Note: this error code is no longer emitted by the compiler.
You can’t perform that action at this time.
0 commit comments