Skip to content

Commit 3ce9b2f

Browse files
committed
document what the span of UseTreeKind::Nested is
1 parent 6579ed8 commit 3ce9b2f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

compiler/rustc_ast/src/ast.rs

+7
Original file line numberDiff line numberDiff line change
@@ -2733,6 +2733,13 @@ pub enum UseTreeKind {
27332733
/// `use prefix` or `use prefix as rename`
27342734
Simple(Option<Ident>),
27352735
/// `use prefix::{...}`
2736+
///
2737+
/// The span represents the braces of the nested group and all elements within:
2738+
///
2739+
/// ```text
2740+
/// use foo::{bar, baz};
2741+
/// ^^^^^^^^^^
2742+
/// ```
27362743
Nested { items: ThinVec<(UseTree, NodeId)>, span: Span },
27372744
/// `use prefix::*`
27382745
Glob,

0 commit comments

Comments
 (0)