document what the span of UseTreeKind::Nested is

This commit is contained in:
Pietro Albini 2024-05-19 10:22:19 +02:00
parent 6579ed89f0
commit 3ce9b2f95b
No known key found for this signature in database
GPG Key ID: 3E06ABE80BAAF19C

View File

@ -2733,6 +2733,13 @@ pub enum UseTreeKind {
/// `use prefix` or `use prefix as rename`
Simple(Option<Ident>),
/// `use prefix::{...}`
///
/// The span represents the braces of the nested group and all elements within:
///
/// ```text
/// use foo::{bar, baz};
/// ^^^^^^^^^^
/// ```
Nested { items: ThinVec<(UseTree, NodeId)>, span: Span },
/// `use prefix::*`
Glob,