File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed
Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -1030,28 +1030,26 @@ struct Bar2; // ok!
10301030"## ,
10311031
10321032E0429 : r##"
1033- To import a namespace itself in addition to some of its members, the `self`
1034- keyword may appear in a brace-enclosed list as the last segment in a `use`
1035- declaration. However, `self` cannot be used alone, without the brace
1036- syntax.
1033+ The `self` keyword cannot appear alone as the last segment in a `use`
1034+ declaration.
10371035
10381036Example of erroneous code:
10391037
10401038```compile_fail
10411039use std::fmt::self; // error: `self` imports are only allowed within a { } list
10421040```
10431041
1044- If you only want to import the namespace, do so directly:
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:
10451044
10461045```
1047- use std::fmt;
1046+ use std::fmt::{self, Debug} ;
10481047```
10491048
1050- If you also want to import members in the same statement, you may use the brace
1051- syntax:
1049+ If you only want to import the namespace, do so directly:
10521050
10531051```
1054- use std::fmt::{self, Debug} ;
1052+ use std::fmt;
10551053```
10561054"## ,
10571055
You can’t perform that action at this time.
0 commit comments