about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPietro Albini <pietro@pietroalbini.org>2024-05-19 10:22:19 +0200
committerPietro Albini <pietro@pietroalbini.org>2024-05-19 10:22:19 +0200
commit3ce9b2f95be2bf2c52d404a4b092566aeca3d9c5 (patch)
treea0fe696d7a9c577883de09bda34fc96de79e320a
parent6579ed89f0fcc26da71afdd11d30d63f6f812a0a (diff)
downloadrust-3ce9b2f95be2bf2c52d404a4b092566aeca3d9c5.tar.gz
rust-3ce9b2f95be2bf2c52d404a4b092566aeca3d9c5.zip
document what the span of UseTreeKind::Nested is
-rw-r--r--compiler/rustc_ast/src/ast.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/rustc_ast/src/ast.rs b/compiler/rustc_ast/src/ast.rs
index 5d37bbd689f..1a166956075 100644
--- a/compiler/rustc_ast/src/ast.rs
+++ b/compiler/rustc_ast/src/ast.rs
@@ -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,