Whitespace fix again.
This commit is contained in:
parent
15982fe369
commit
d0790c490a
14 changed files with 109 additions and 100 deletions
|
@ -143,9 +143,11 @@ impl<'a, 'hir> Visitor<'hir> for CheckLoopVisitor<'a, 'hir> {
|
|||
`loop` or breakable block")
|
||||
.span_suggestion_with_applicability(
|
||||
e.span,
|
||||
&format!("instead, use `break` on its own \
|
||||
&format!(
|
||||
"instead, use `break` on its own \
|
||||
without a value inside this `{}` loop",
|
||||
kind.name()),
|
||||
kind.name()
|
||||
),
|
||||
"break".to_string(),
|
||||
Applicability::MaybeIncorrect,
|
||||
)
|
||||
|
|
|
@ -4829,8 +4829,12 @@ fn show_candidates(err: &mut DiagnosticBuilder,
|
|||
*candidate = format!("use {};\n{}", candidate, additional_newline);
|
||||
}
|
||||
|
||||
err.span_suggestions_with_applicability(span, &msg, path_strings,
|
||||
Applicability::Unspecified);
|
||||
err.span_suggestions_with_applicability(
|
||||
span,
|
||||
&msg,
|
||||
path_strings,
|
||||
Applicability::Unspecified,
|
||||
);
|
||||
} else {
|
||||
let mut msg = msg;
|
||||
msg.push(':');
|
||||
|
|
|
@ -299,7 +299,8 @@ impl<'a, 'gcx, 'tcx> CastCheck<'tcx> {
|
|||
err.note("The type information given here is insufficient to check whether \
|
||||
the pointer cast is valid");
|
||||
if unknown_cast_to {
|
||||
err.span_suggestion_short_with_applicability(self.cast_span,
|
||||
err.span_suggestion_short_with_applicability(
|
||||
self.cast_span,
|
||||
"consider giving more type information",
|
||||
String::new(),
|
||||
Applicability::Unspecified,
|
||||
|
@ -329,7 +330,8 @@ impl<'a, 'gcx, 'tcx> CastCheck<'tcx> {
|
|||
if self.cast_ty.is_trait() {
|
||||
match fcx.tcx.sess.source_map().span_to_snippet(self.cast_span) {
|
||||
Ok(s) => {
|
||||
err.span_suggestion_with_applicability(self.cast_span,
|
||||
err.span_suggestion_with_applicability(
|
||||
self.cast_span,
|
||||
"try casting to a reference instead",
|
||||
format!("&{}{}", mtstr, s),
|
||||
Applicability::MachineApplicable,
|
||||
|
@ -350,7 +352,8 @@ impl<'a, 'gcx, 'tcx> CastCheck<'tcx> {
|
|||
ty::Adt(def, ..) if def.is_box() => {
|
||||
match fcx.tcx.sess.source_map().span_to_snippet(self.cast_span) {
|
||||
Ok(s) => {
|
||||
err.span_suggestion_with_applicability(self.cast_span,
|
||||
err.span_suggestion_with_applicability(
|
||||
self.cast_span,
|
||||
"try casting to a `Box` instead",
|
||||
format!("Box<{}>", s),
|
||||
Applicability::MachineApplicable,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue