Skip to content

Commit 0b4605f

Browse files
Revert "Add error explanation for E00070"
This reverts commit 25037c9.
1 parent 25037c9 commit 0b4605f

File tree

1 file changed

+1
-24
lines changed

1 file changed

+1
-24
lines changed

src/librustc_typeck/diagnostics.rs

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -170,30 +170,6 @@ Since `return;` is just like `return ();`, there is a mismatch between the
170170
function's return type and the value being returned.
171171
"##,
172172

173-
E0070: r##"
174-
You tried to change the value of a const variable, which is not possible. Bad
175-
example:
176-
177-
```
178-
const SOME_CONST : i32 = 12;
179-
180-
fn some_function() {
181-
SOME_CONST = 14; // error !
182-
}
183-
```
184-
185-
Constant variables' value can be changed once it has been set. Please take a
186-
look to static keyword if you want something similar but mutable:
187-
188-
```
189-
static mut SOME_NOT_CONST : i32 = 12;
190-
191-
fn some_function() {
192-
SOME_NOT_CONST = 14; // that's good !
193-
}
194-
```
195-
"##,
196-
197173
E0081: r##"
198174
Enum discriminants are used to differentiate enum variants stored in memory.
199175
This error indicates that the same value was used for two or more variants,
@@ -682,6 +658,7 @@ register_diagnostics! {
682658
E0060,
683659
E0061,
684660
E0068,
661+
E0070,
685662
E0071,
686663
E0072,
687664
E0073,

0 commit comments

Comments
 (0)