}
DiagnosticBuilderMethod::SpanSuggestion(suggestion) => {
let span = span_maybe.expect("span_suggestion_* needs a span");
- diag_builder.span_suggestion_with_applicability(span, message, suggestion,
- Applicability::Unspecified);
+ diag_builder.span_suggestion_with_applicability(
+ span,
+ message,
+ suggestion,
+ Applicability::Unspecified,
+ );
}
}
}
db.note(fn_closure_msg);
} else {
db.span_suggestion_with_applicability(
- sp, msg, suggestion, Applicability::Unspecified);
+ sp,
+ msg,
+ suggestion,
+ Applicability::Unspecified,
+ );
}
} else {
db.span_suggestion_with_applicability(
- sp, msg, suggestion, Applicability::Unspecified);
+ sp,
+ msg,
+ suggestion,
+ Applicability::Unspecified,
+ );
}
}
_ => {
&cmt_path_or_string,
capture_span,
Origin::Ast)
- .span_suggestion_with_applicability(err.span,
- &format!("to force the closure to take ownership of {} \
- (and any other referenced variables), \
- use the `move` keyword",
- cmt_path_or_string),
- suggestion,
- Applicability::Unspecified,
+ .span_suggestion_with_applicability(
+ err.span,
+ &format!("to force the closure to take ownership of {} \
+ (and any other referenced variables), \
+ use the `move` keyword",
+ cmt_path_or_string),
+ suggestion,
+ Applicability::Unspecified,
)
.emit();
self.signal_error();
suggestion: Vec<(Span, String)>,
) -> &mut Self {
self.multipart_suggestion_with_applicability(
- msg,
- suggestion,
- Applicability::Unspecified
- )
+ msg,
+ suggestion,
+ Applicability::Unspecified,
+ )
}
/// Prints out a message with multiple suggested edits of the code.
-> &mut Self);
#[deprecated(note = "Use `span_suggestion_short_with_applicability`")]
- forward!(pub fn span_suggestion_short(&mut self,
- sp: Span,
- msg: &str,
+ forward!(pub fn span_suggestion_short(
+ &mut self,
+ sp: Span,
+ msg: &str,
suggestion: String)
-> &mut Self);
.span_label(e.span,
"can only break with a value inside \
`loop` or breakable block")
- .span_suggestion_with_applicability(e.span,
+ .span_suggestion_with_applicability(
+ e.span,
&format!("instead, use `break` on its own \
without a value inside this `{}` loop",
kind.name()),
err.span_label(base_span,
"expecting a type here because of type ascription");
if line_sp != line_base_sp {
- err.span_suggestion_short_with_applicability(sp,
+ err.span_suggestion_short_with_applicability(
+ sp,
"did you mean to use `;` here instead?",
";".to_string(),
Applicability::Unspecified,