File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -3068,7 +3068,29 @@ impl<'a> LoweringContext<'a> {
30683068 hir:: ItemKind :: Use ( path, hir:: UseKind :: Glob )
30693069 }
30703070 UseTreeKind :: Nested ( ref trees) => {
3071- // Nested imports are desugared into simple imports.
3071+ // Nested imports are desugared into simple
3072+ // imports. So if we start with
3073+ //
3074+ // ```
3075+ // pub(x) use foo::{a, b};
3076+ // ```
3077+ //
3078+ // we will create three items:
3079+ //
3080+ // ```
3081+ // pub(x) use foo::a;
3082+ // pub(x) use foo::b;
3083+ // pub(x) use foo::{}; // <-- this is called the `ListStem`
3084+ // ```
3085+ //
3086+ // The first two are produced by recursively invoking
3087+ // `lower_use_tree` (and indeed there may be things
3088+ // like `use foo::{a::{b, c}}` and so forth). They
3089+ // wind up being directly added to
3090+ // `self.items`. However, the structure of this
3091+ // function also requires us to return one item, and
3092+ // for that we return the `{}` import (called the
3093+ // "`ListStem`").
30723094
30733095 let prefix = Path {
30743096 segments,
You can’t perform that action at this time.
0 commit comments