Rollup merge of #66754 - estebank:rustdoc-capitalization, r=Dylan-DPC

Various tweaks to diagnostic output
This commit is contained in:
Tyler Mandry 2019-11-26 17:56:19 -06:00 committed by GitHub
commit bb6236cd74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
35 changed files with 115 additions and 300 deletions

View file

@ -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 {