diff options
| author | Tyler Mandry <tmandry@gmail.com> | 2019-11-26 17:56:19 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-26 17:56:19 -0600 |
| commit | bb6236cd749dc5e708d6846c9b2c004766627851 (patch) | |
| tree | 91b8b5047b7b19a969896a00057916ac68a0c7db /src/librustc_parse | |
| parent | 0b3d4a1fa45c2926fe133a17f42a40b75eafd885 (diff) | |
| parent | 5ea922aec4a66458728fbe74a6e8096ab76f9aec (diff) | |
| download | rust-bb6236cd749dc5e708d6846c9b2c004766627851.tar.gz rust-bb6236cd749dc5e708d6846c9b2c004766627851.zip | |
Rollup merge of #66754 - estebank:rustdoc-capitalization, r=Dylan-DPC
Various tweaks to diagnostic output
Diffstat (limited to 'src/librustc_parse')
| -rw-r--r-- | src/librustc_parse/parser/item.rs | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/librustc_parse/parser/item.rs b/src/librustc_parse/parser/item.rs index 2c9d4004226..cab9b8b78d3 100644 --- a/src/librustc_parse/parser/item.rs +++ b/src/librustc_parse/parser/item.rs @@ -491,9 +491,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; @@ -532,9 +535,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 { |
