Rustfmt
This commit is contained in:
@@ -106,11 +106,10 @@ impl<'a> Parser<'a> {
|
||||
self.parse_path_segments(&mut path.segments, style, None)?;
|
||||
}
|
||||
|
||||
Ok((qself, Path {
|
||||
segments: path.segments,
|
||||
span: lo.to(self.prev_token.span),
|
||||
tokens: None,
|
||||
}))
|
||||
Ok((
|
||||
qself,
|
||||
Path { segments: path.segments, span: lo.to(self.prev_token.span), tokens: None },
|
||||
))
|
||||
}
|
||||
|
||||
/// Recover from an invalid single colon, when the user likely meant a qualified path.
|
||||
@@ -485,13 +484,16 @@ impl<'a> Parser<'a> {
|
||||
|
||||
error.span_suggestion_verbose(
|
||||
prev_token_before_parsing.span,
|
||||
format!("consider removing the `::` here to {}", match style {
|
||||
PathStyle::Expr => "call the expression",
|
||||
PathStyle::Pat => "turn this into a tuple struct pattern",
|
||||
_ => {
|
||||
return;
|
||||
format!(
|
||||
"consider removing the `::` here to {}",
|
||||
match style {
|
||||
PathStyle::Expr => "call the expression",
|
||||
PathStyle::Pat => "turn this into a tuple struct pattern",
|
||||
_ => {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}),
|
||||
),
|
||||
"",
|
||||
Applicability::MaybeIncorrect,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user