diff options
| author | Pietro Albini <pietro@pietroalbini.org> | 2024-04-02 00:26:10 +0200 |
|---|---|---|
| committer | Pietro Albini <pietro@pietroalbini.org> | 2024-04-14 18:45:28 +0200 |
| commit | 13f76235b333f4b9c750be45839b488d7f5c8203 (patch) | |
| tree | 42289a05fb4042517ef2207473b478cdb5f67d9a /compiler/rustc_builtin_macros/src/assert | |
| parent | 2ec337c19336845b371dcd6bc1369e6b34124afd (diff) | |
| download | rust-13f76235b333f4b9c750be45839b488d7f5c8203.tar.gz rust-13f76235b333f4b9c750be45839b488d7f5c8203.zip | |
store the span of the nested part of the use tree in the ast
Diffstat (limited to 'compiler/rustc_builtin_macros/src/assert')
| -rw-r--r-- | compiler/rustc_builtin_macros/src/assert/context.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/compiler/rustc_builtin_macros/src/assert/context.rs b/compiler/rustc_builtin_macros/src/assert/context.rs index 92efeab08eb..085ea3458bb 100644 --- a/compiler/rustc_builtin_macros/src/assert/context.rs +++ b/compiler/rustc_builtin_macros/src/assert/context.rs @@ -120,10 +120,13 @@ impl<'cx, 'a> Context<'cx, 'a> { thin_vec![self.cx.attr_nested_word(sym::allow, sym::unused_imports, self.span)], ItemKind::Use(UseTree { prefix: self.cx.path(self.span, self.cx.std_path(&[sym::asserting])), - kind: UseTreeKind::Nested(thin_vec![ - nested_tree(self, sym::TryCaptureGeneric), - nested_tree(self, sym::TryCapturePrintable), - ]), + kind: UseTreeKind::Nested { + items: thin_vec![ + nested_tree(self, sym::TryCaptureGeneric), + nested_tree(self, sym::TryCapturePrintable), + ], + span: self.span, + }, span: self.span, }), ), |
