File tree 1 file changed +24
-1
lines changed
1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -1029,6 +1029,30 @@ struct Bar2; // ok!
1029
1029
```
1030
1030
"## ,
1031
1031
1032
+ E0429 : r##"
1033
+ The `self` keyword cannot appear alone as the last segment in a `use`
1034
+ declaration.
1035
+
1036
+ Example of erroneous code:
1037
+
1038
+ ```compile_fail
1039
+ use std::fmt::self; // error: `self` imports are only allowed within a { } list
1040
+ ```
1041
+
1042
+ To use a namespace itself in addition to some of its members, `self` may appear
1043
+ as part of a brace-enclosed list of imports:
1044
+
1045
+ ```
1046
+ use std::fmt::{self, Debug};
1047
+ ```
1048
+
1049
+ If you only want to import the namespace, do so directly:
1050
+
1051
+ ```
1052
+ use std::fmt;
1053
+ ```
1054
+ "## ,
1055
+
1032
1056
E0430 : r##"
1033
1057
The `self` import appears more than once in the list. Erroneous code example:
1034
1058
@@ -1235,5 +1259,4 @@ register_diagnostics! {
1235
1259
E0420 , // is not an associated const
1236
1260
E0421 , // unresolved associated const
1237
1261
E0427 , // cannot use `ref` binding mode with ...
1238
- E0429 , // `self` imports are only allowed within a { } list
1239
1262
}
You can’t perform that action at this time.
0 commit comments