File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 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 };
875875
876876E0384 : r##"
877877This error occurs when an attempt is made to reassign an immutable variable.
878- For example:
878+
879+ Erroneous code example:
879880
880881```compile_fail,E0384
881882fn main() {
@@ -895,13 +896,15 @@ fn main() {
895896```
896897"## ,
897898
898- /*E0386: r##"
899+ E0386 : r##"
900+ #### Note: this error code is no longer emitted by the compiler.
901+
899902This error occurs when an attempt is made to mutate the target of a mutable
900903reference stored inside an immutable container.
901904
902905For example, this can happen when storing a `&mut` inside an immutable `Box`:
903906
904- ```compile_fail,E0386
907+ ```
905908let mut x: i64 = 1;
906909let y: Box<_> = Box::new(&mut x);
907910**y = 2; // error, cannot assign to data in an immutable container
@@ -925,7 +928,7 @@ let x: i64 = 1;
925928let y: Box<Cell<_>> = Box::new(Cell::new(x));
926929y.set(2);
927930```
928- "##,*/
931+ "## ,
929932
930933E0387 : r##"
931934#### Note: this error code is no longer emitted by the compiler.
You can’t perform that action at this time.
0 commit comments