Skip to content

Commit c6de3eb

Browse files
Uncomment E0386 to let users have access to its old definition
1 parent 307a356 commit c6de3eb

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/librustc_mir/error_codes.rs

+7-4
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,8 @@ x = Foo { a: 2 };
875875

876876
E0384: r##"
877877
This 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
881882
fn 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+
899902
This error occurs when an attempt is made to mutate the target of a mutable
900903
reference stored inside an immutable container.
901904
902905
For example, this can happen when storing a `&mut` inside an immutable `Box`:
903906
904-
```compile_fail,E0386
907+
```
905908
let mut x: i64 = 1;
906909
let 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;
925928
let y: Box<Cell<_>> = Box::new(Cell::new(x));
926929
y.set(2);
927930
```
928-
"##,*/
931+
"##,
929932

930933
E0387: r##"
931934
#### Note: this error code is no longer emitted by the compiler.

0 commit comments

Comments
 (0)