From 3ce9b2f95be2bf2c52d404a4b092566aeca3d9c5 Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Sun, 19 May 2024 10:22:19 +0200 Subject: [PATCH] document what the span of UseTreeKind::Nested is --- compiler/rustc_ast/src/ast.rs | 7 +++++++ 1 file changed, 7 insertions(+) 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), /// `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,