@@ -2131,7 +2131,7 @@ pub fn check_expr_with_unifier(fcx: @FnCtxt,
2131
2131
fcx. write_error ( expr. id ) ;
2132
2132
fcx. write_error ( rhs. id ) ;
2133
2133
fcx. type_error_message ( expr. span , |actual| {
2134
- format ! ( "binary operation {} cannot be applied \
2134
+ format ! ( "binary operation `{}` cannot be applied \
2135
2135
to type `{}`",
2136
2136
ast_util:: binop_to_str( op) , actual) } ,
2137
2137
lhs_t, None )
@@ -2153,7 +2153,7 @@ pub fn check_expr_with_unifier(fcx: @FnCtxt,
2153
2153
fcx. type_error_message ( expr. span ,
2154
2154
|actual| {
2155
2155
format ! ( "binary assignment operation \
2156
- {}= cannot be applied to type `{}`",
2156
+ ` {}=` cannot be applied to type `{}`",
2157
2157
ast_util:: binop_to_str( op) ,
2158
2158
actual)
2159
2159
} ,
@@ -2182,7 +2182,7 @@ pub fn check_expr_with_unifier(fcx: @FnCtxt,
2182
2182
Some ( ref name) => {
2183
2183
let if_op_unbound = || {
2184
2184
fcx. type_error_message ( ex. span , |actual| {
2185
- format ! ( "binary operation {} cannot be applied \
2185
+ format ! ( "binary operation `{}` cannot be applied \
2186
2186
to type `{}`",
2187
2187
ast_util:: binop_to_str( op) , actual) } ,
2188
2188
lhs_resolved_t, None )
@@ -2850,7 +2850,7 @@ pub fn check_expr_with_unifier(fcx: @FnCtxt,
2850
2850
_ => {
2851
2851
fcx. type_error_message ( expr. span ,
2852
2852
|actual| {
2853
- format ! ( "type {} cannot be dereferenced" , actual)
2853
+ format ! ( "type `{}` cannot be dereferenced" , actual)
2854
2854
} , oprnd_t, None ) ;
2855
2855
}
2856
2856
}
0 commit comments