Skip to content

Commit f59933f

Browse files
---
yaml --- r: 223247 b: refs/heads/auto c: cd0af45 h: refs/heads/master i: 223245: b7b73ef 223243: f0aae55 223239: 9029045 223231: 66187ed v: v3
1 parent 8576733 commit f59933f

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
88
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
99
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1010
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
11-
refs/heads/auto: 086a5c74febf31650dff3ffbd7c2806056f02933
11+
refs/heads/auto: cd0af4515b6a3e523034c499a820b5f3bf3318cd
1212
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1313
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
1414
refs/tags/0.2: 1754d02027f2924bed83b0160ee340c7f41d5ea1

branches/auto/src/librustc_resolve/diagnostics.rs

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,26 @@ use something_which_doesnt_exist;
638638
Please verify you didn't misspell the import's name.
639639
"##,
640640

641+
E0435: r##"
642+
A non-constant value was used in a const. Example of erroneous code:
643+
644+
```
645+
let foo = 42u32;
646+
const FOO : u32 = foo; // error: attempt to use a non-constant value in a
647+
// constant
648+
```
649+
650+
To fix this error, please replace the value by a constant one. Example:
651+
652+
```
653+
const FOO : u32 = 42u32; // ok!
654+
655+
// or:
656+
const OTHER_FOO : u32 = 42u32;
657+
const FOO : u32 = OTHER_FOO; // ok!
658+
```
659+
"##,
660+
641661
E0437: r##"
642662
Trait impls can only implement associated types that are members of the trait in
643663
question. This error indicates that you attempted to implement an associated
@@ -717,5 +737,4 @@ register_diagnostics! {
717737
E0427, // cannot use `ref` binding mode with ...
718738
E0429, // `self` imports are only allowed within a { } list
719739
E0434, // can't capture dynamic environment in a fn item
720-
E0435, // attempt to use a non-constant value in a constant
721740
}

0 commit comments

Comments
 (0)