Skip to content

Commit 7d9e605

Browse files
committed
Add error explanation for E0317.
1 parent 750f2c6 commit 7d9e605

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

src/librustc_resolve/diagnostics.rs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,24 @@
1010

1111
#![allow(non_snake_case)]
1212

13+
// Error messages for EXXXX errors.
14+
// Each message should start and end with a new line, and be wrapped to 80 characters.
15+
// In vim you can `:set tw=80` and use `gq` to wrap paragraphs. Use `:set tw=0` to disable.
16+
register_long_diagnostics! {
17+
18+
E0317: r##"
19+
User-defined types or type parameters cannot shadow the primitive types.
20+
This error indicates you tried to define a type, struct or enum with the same
21+
name as an existing primitive type, and is therefore invalid.
22+
23+
See the Types section of the reference for more information about the primitive
24+
types:
25+
26+
http://doc.rust-lang.org/nightly/reference.html#types
27+
"##
28+
29+
}
30+
1331
register_diagnostics! {
1432
E0154,
1533
E0157,
@@ -24,7 +42,6 @@ register_diagnostics! {
2442
E0258, // import conflicts with existing submodule
2543
E0259, // an extern crate has already been imported into this module
2644
E0260, // name conflicts with an external crate that has been imported into this module
27-
E0317, // user-defined types or type parameters cannot shadow the primitive types
2845
E0364, // item is private
2946
E0365 // item is private
3047
}

0 commit comments

Comments
 (0)