1
Fork 0

infer: Drop pointless format! calls

This commit is contained in:
Richo Healey 2015-03-24 20:59:17 -07:00
parent e15bebfefa
commit c193fe4f3c

View file

@ -1481,38 +1481,38 @@ impl<'a, 'tcx> ErrorReportingHelpers<'tcx> for InferCtxt<'a, 'tcx> {
infer::Subtype(ref trace) => { infer::Subtype(ref trace) => {
let desc = match trace.origin { let desc = match trace.origin {
infer::Misc(_) => { infer::Misc(_) => {
format!("types are compatible") "types are compatible"
} }
infer::MethodCompatCheck(_) => { infer::MethodCompatCheck(_) => {
format!("method type is compatible with trait") "method type is compatible with trait"
} }
infer::ExprAssignable(_) => { infer::ExprAssignable(_) => {
format!("expression is assignable") "expression is assignable"
} }
infer::RelateTraitRefs(_) => { infer::RelateTraitRefs(_) => {
format!("traits are compatible") "traits are compatible"
} }
infer::RelateSelfType(_) => { infer::RelateSelfType(_) => {
format!("self type matches impl self type") "self type matches impl self type"
} }
infer::RelateOutputImplTypes(_) => { infer::RelateOutputImplTypes(_) => {
format!("trait type parameters matches those \ "trait type parameters matches those \
specified on the impl") specified on the impl"
} }
infer::MatchExpressionArm(_, _) => { infer::MatchExpressionArm(_, _) => {
format!("match arms have compatible types") "match arms have compatible types"
} }
infer::IfExpression(_) => { infer::IfExpression(_) => {
format!("if and else have compatible types") "if and else have compatible types"
} }
infer::IfExpressionWithNoElse(_) => { infer::IfExpressionWithNoElse(_) => {
format!("if may be missing an else clause") "if may be missing an else clause"
} }
infer::RangeExpression(_) => { infer::RangeExpression(_) => {
format!("start and end of range have compatible types") "start and end of range have compatible types"
} }
infer::EquatePredicate(_) => { infer::EquatePredicate(_) => {
format!("equality where clause is satisfied") "equality where clause is satisfied"
} }
}; };
@ -1652,8 +1652,8 @@ impl<'a, 'tcx> ErrorReportingHelpers<'tcx> for InferCtxt<'a, 'tcx> {
infer::RelateRegionParamBound(span) => { infer::RelateRegionParamBound(span) => {
self.tcx.sess.span_note( self.tcx.sess.span_note(
span, span,
&format!("...so that the declared lifetime parameter bounds \ "...so that the declared lifetime parameter bounds \
are satisfied")); are satisfied");
} }
infer::SafeDestructor(span) => { infer::SafeDestructor(span) => {
self.tcx.sess.span_note( self.tcx.sess.span_note(