Various cleanups
This commit is contained in:
parent
85fb054fef
commit
5ea922aec4
4 changed files with 22 additions and 21 deletions
|
|
@ -490,9 +490,12 @@ impl<'a> Parser<'a> {
|
|||
}
|
||||
|
||||
/// Parses a macro invocation inside a `trait`, `impl` or `extern` block.
|
||||
fn parse_assoc_macro_invoc(&mut self, item_kind: &str, vis: Option<&Visibility>,
|
||||
at_end: &mut bool) -> PResult<'a, Option<Mac>>
|
||||
{
|
||||
fn parse_assoc_macro_invoc(
|
||||
&mut self,
|
||||
item_kind: &str,
|
||||
vis: Option<&Visibility>,
|
||||
at_end: &mut bool,
|
||||
) -> PResult<'a, Option<Mac>> {
|
||||
if self.token.is_path_start() &&
|
||||
!(self.is_async_fn() && self.token.span.rust_2015()) {
|
||||
let prev_span = self.prev_span;
|
||||
|
|
@ -531,9 +534,11 @@ impl<'a> Parser<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
fn missing_assoc_item_kind_err(&self, item_type: &str, prev_span: Span)
|
||||
-> DiagnosticBuilder<'a>
|
||||
{
|
||||
fn missing_assoc_item_kind_err(
|
||||
&self,
|
||||
item_type: &str,
|
||||
prev_span: Span,
|
||||
) -> DiagnosticBuilder<'a> {
|
||||
let expected_kinds = if item_type == "extern" {
|
||||
"missing `fn`, `type`, or `static`"
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue