Skip to content

Commit c193fe4

Browse files
committed
infer: Drop pointless format! calls
1 parent e15bebf commit c193fe4

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/librustc/middle/infer/error_reporting.rs

+14-14
Original file line numberDiff line numberDiff line change
@@ -1481,38 +1481,38 @@ impl<'a, 'tcx> ErrorReportingHelpers<'tcx> for InferCtxt<'a, 'tcx> {
14811481
infer::Subtype(ref trace) => {
14821482
let desc = match trace.origin {
14831483
infer::Misc(_) => {
1484-
format!("types are compatible")
1484+
"types are compatible"
14851485
}
14861486
infer::MethodCompatCheck(_) => {
1487-
format!("method type is compatible with trait")
1487+
"method type is compatible with trait"
14881488
}
14891489
infer::ExprAssignable(_) => {
1490-
format!("expression is assignable")
1490+
"expression is assignable"
14911491
}
14921492
infer::RelateTraitRefs(_) => {
1493-
format!("traits are compatible")
1493+
"traits are compatible"
14941494
}
14951495
infer::RelateSelfType(_) => {
1496-
format!("self type matches impl self type")
1496+
"self type matches impl self type"
14971497
}
14981498
infer::RelateOutputImplTypes(_) => {
1499-
format!("trait type parameters matches those \
1500-
specified on the impl")
1499+
"trait type parameters matches those \
1500+
specified on the impl"
15011501
}
15021502
infer::MatchExpressionArm(_, _) => {
1503-
format!("match arms have compatible types")
1503+
"match arms have compatible types"
15041504
}
15051505
infer::IfExpression(_) => {
1506-
format!("if and else have compatible types")
1506+
"if and else have compatible types"
15071507
}
15081508
infer::IfExpressionWithNoElse(_) => {
1509-
format!("if may be missing an else clause")
1509+
"if may be missing an else clause"
15101510
}
15111511
infer::RangeExpression(_) => {
1512-
format!("start and end of range have compatible types")
1512+
"start and end of range have compatible types"
15131513
}
15141514
infer::EquatePredicate(_) => {
1515-
format!("equality where clause is satisfied")
1515+
"equality where clause is satisfied"
15161516
}
15171517
};
15181518

@@ -1652,8 +1652,8 @@ impl<'a, 'tcx> ErrorReportingHelpers<'tcx> for InferCtxt<'a, 'tcx> {
16521652
infer::RelateRegionParamBound(span) => {
16531653
self.tcx.sess.span_note(
16541654
span,
1655-
&format!("...so that the declared lifetime parameter bounds \
1656-
are satisfied"));
1655+
"...so that the declared lifetime parameter bounds \
1656+
are satisfied");
16571657
}
16581658
infer::SafeDestructor(span) => {
16591659
self.tcx.sess.span_note(

0 commit comments

Comments
 (0)