File tree Expand file tree Collapse file tree 2 files changed +21
-2
lines changed
trunk/src/librustc_resolve Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 086a5c74febf31650dff3ffbd7c2806056f02933
2
+ refs/heads/master: cd0af4515b6a3e523034c499a820b5f3bf3318cd
3
3
refs/heads/snap-stage3: a5c12f4e39d32af3c951b66bd2839bc0b5a1125b
4
4
refs/heads/try: b53c0f93eedcdedd4fd89bccc5a3a09d1c5cd23e
5
5
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
Original file line number Diff line number Diff line change @@ -638,6 +638,26 @@ use something_which_doesnt_exist;
638
638
Please verify you didn't misspell the import's name.
639
639
"## ,
640
640
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
+
641
661
E0437 : r##"
642
662
Trait impls can only implement associated types that are members of the trait in
643
663
question. This error indicates that you attempted to implement an associated
@@ -717,5 +737,4 @@ register_diagnostics! {
717
737
E0427 , // cannot use `ref` binding mode with ...
718
738
E0429 , // `self` imports are only allowed within a { } list
719
739
E0434 , // can't capture dynamic environment in a fn item
720
- E0435 , // attempt to use a non-constant value in a constant
721
740
}
You can’t perform that action at this time.
0 commit comments