Skip to content

Commit

Permalink
infer: Drop pointless format! calls
Browse files Browse the repository at this point in the history
  • Loading branch information
richo committed Mar 26, 2015
1 parent e15bebf commit c193fe4
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/librustc/middle/infer/error_reporting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1481,38 +1481,38 @@ impl<'a, 'tcx> ErrorReportingHelpers<'tcx> for InferCtxt<'a, 'tcx> {
infer::Subtype(ref trace) => {
let desc = match trace.origin {
infer::Misc(_) => {
format!("types are compatible")
"types are compatible"
}
infer::MethodCompatCheck(_) => {
format!("method type is compatible with trait")
"method type is compatible with trait"
}
infer::ExprAssignable(_) => {
format!("expression is assignable")
"expression is assignable"
}
infer::RelateTraitRefs(_) => {
format!("traits are compatible")
"traits are compatible"
}
infer::RelateSelfType(_) => {
format!("self type matches impl self type")
"self type matches impl self type"
}
infer::RelateOutputImplTypes(_) => {
format!("trait type parameters matches those \
specified on the impl")
"trait type parameters matches those \
specified on the impl"
}
infer::MatchExpressionArm(_, _) => {
format!("match arms have compatible types")
"match arms have compatible types"
}
infer::IfExpression(_) => {
format!("if and else have compatible types")
"if and else have compatible types"
}
infer::IfExpressionWithNoElse(_) => {
format!("if may be missing an else clause")
"if may be missing an else clause"
}
infer::RangeExpression(_) => {
format!("start and end of range have compatible types")
"start and end of range have compatible types"
}
infer::EquatePredicate(_) => {
format!("equality where clause is satisfied")
"equality where clause is satisfied"
}
};

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

0 comments on commit c193fe4

Please sign in to comment.