diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-08-06 10:17:46 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-08-16 09:07:29 +1000 |
| commit | c8098be41fa767a96cfb3665147fabf06f456be9 (patch) | |
| tree | e2182b48301ad031e61d0527f91792750a0fcc04 /compiler/rustc_parse/src/parser/attr.rs | |
| parent | 55906aa2407b10b4f910c221be6f40e549780bb8 (diff) | |
| download | rust-c8098be41fa767a96cfb3665147fabf06f456be9.tar.gz rust-c8098be41fa767a96cfb3665147fabf06f456be9.zip | |
Convert a bool to `Trailing`.
This pre-existing type is suitable for use with the return value of the `f` parameter in `collect_tokens_trailing_token`. The more descriptive name will be useful because the next commit will add another boolean value to the return value of `f`.
Diffstat (limited to 'compiler/rustc_parse/src/parser/attr.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/attr.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_parse/src/parser/attr.rs b/compiler/rustc_parse/src/parser/attr.rs index 645fde25cd4..1ae26309e44 100644 --- a/compiler/rustc_parse/src/parser/attr.rs +++ b/compiler/rustc_parse/src/parser/attr.rs @@ -8,7 +8,9 @@ use rustc_span::{sym, BytePos, Span}; use thin_vec::ThinVec; use tracing::debug; -use super::{AttrWrapper, Capturing, FnParseMode, ForceCollect, Parser, ParserRange, PathStyle}; +use super::{ + AttrWrapper, Capturing, FnParseMode, ForceCollect, Parser, ParserRange, PathStyle, Trailing, +}; use crate::{errors, fluent_generated as fluent, maybe_whole}; // Public for rustfmt usage @@ -273,7 +275,7 @@ impl<'a> Parser<'a> { if is_unsafe { this.expect(&token::CloseDelim(Delimiter::Parenthesis))?; } - Ok((ast::AttrItem { unsafety, path, args, tokens: None }, false)) + Ok((ast::AttrItem { unsafety, path, args, tokens: None }, Trailing::No)) }; // Attr items don't have attributes. self.collect_tokens_trailing_token(AttrWrapper::empty(), force_collect, do_parse) |
