diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-04-30 10:18:26 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-30 10:18:26 +0200 |
| commit | 56e01fe1a47541451408b2546d49b4bc4a3d6778 (patch) | |
| tree | f0c8dafce5dbfe0a565f9f46fe6050287e83ce17 /compiler/rustc_expand | |
| parent | aeec053e1b95b35df3dbd3e064721a55e0d0ac8f (diff) | |
| parent | 99f6b6328e7b418abe2e3bcf49b4504c2866671e (diff) | |
| download | rust-56e01fe1a47541451408b2546d49b4bc4a3d6778.tar.gz rust-56e01fe1a47541451408b2546d49b4bc4a3d6778.zip | |
Rollup merge of #140312 - nnethercote:DelimArgs-spacing, r=petrochenkov
Improve pretty-printing of braces r? ````@petrochenkov````
Diffstat (limited to 'compiler/rustc_expand')
| -rw-r--r-- | compiler/rustc_expand/src/build.rs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/compiler/rustc_expand/src/build.rs b/compiler/rustc_expand/src/build.rs index 6d616cf84bb..14b8cc90d97 100644 --- a/compiler/rustc_expand/src/build.rs +++ b/compiler/rustc_expand/src/build.rs @@ -1,8 +1,10 @@ use rustc_ast::ptr::P; +use rustc_ast::token::Delimiter; +use rustc_ast::tokenstream::TokenStream; use rustc_ast::util::literal; use rustc_ast::{ self as ast, AnonConst, AttrVec, BlockCheckMode, Expr, LocalKind, MatchKind, PatKind, UnOp, - attr, token, + attr, token, tokenstream, }; use rustc_span::source_map::Spanned; use rustc_span::{DUMMY_SP, Ident, Span, Symbol, kw, sym}; @@ -55,13 +57,13 @@ impl<'a> ExtCtxt<'a> { &self, span: Span, path: ast::Path, - delim: ast::token::Delimiter, - tokens: ast::tokenstream::TokenStream, + delim: Delimiter, + tokens: TokenStream, ) -> P<ast::MacCall> { P(ast::MacCall { path, args: P(ast::DelimArgs { - dspan: ast::tokenstream::DelimSpan { open: span, close: span }, + dspan: tokenstream::DelimSpan { open: span, close: span }, delim, tokens, }), @@ -480,8 +482,8 @@ impl<'a> ExtCtxt<'a> { span, [sym::std, sym::unreachable].map(|s| Ident::new(s, span)).to_vec(), ), - ast::token::Delimiter::Parenthesis, - ast::tokenstream::TokenStream::default(), + Delimiter::Parenthesis, + TokenStream::default(), ), ) } |
