@@ -1007,7 +1007,7 @@ pub impl Resolver {
1007
1007
let ns = namespace_for_duplicate_checking_mode(
1008
1008
duplicate_checking_mode);
1009
1009
self.session.span_err(sp,
1010
- fmt!(" duplicate definition of %s %s ",
1010
+ fmt!(" duplicate definition of %s `%s` ",
1011
1011
namespace_to_str( ns) ,
1012
1012
* self . session. str_of( name) ) ) ;
1013
1013
for child. span_for_namespace ( ns) . each |sp| {
@@ -1959,7 +1959,7 @@ pub impl Resolver {
1959
1959
match self . resolve_import_for_module ( module, import_directive) {
1960
1960
Failed => {
1961
1961
// We presumably emitted an error. Continue.
1962
- let msg = fmt ! ( "failed to resolve import: %s " ,
1962
+ let msg = fmt ! ( "failed to resolve import `%s` " ,
1963
1963
* self . import_path_to_str(
1964
1964
import_directive. module_path,
1965
1965
* import_directive. subclass) ) ;
@@ -2488,7 +2488,7 @@ pub impl Resolver {
2488
2488
self . session . span_err ( span { lo : span. lo , hi : span. lo +
2489
2489
BytePos ( str:: len ( * segment_name) ) , expn_info :
2490
2490
span. expn_info } , fmt ! ( "unresolved import. maybe \
2491
- a missing ' extern mod %s' ?",
2491
+ a missing ` extern mod %s` ?",
2492
2492
* segment_name) ) ;
2493
2493
return Failed ;
2494
2494
}
@@ -2511,7 +2511,7 @@ pub impl Resolver {
2511
2511
// Not a module.
2512
2512
self . session . span_err ( span,
2513
2513
fmt ! ( "not a \
2514
- module: %s ",
2514
+ module `%s` ",
2515
2515
* self . session.
2516
2516
str_of(
2517
2517
name) ) ) ;
@@ -2525,7 +2525,7 @@ pub impl Resolver {
2525
2525
None => {
2526
2526
// There are no type bindings at all.
2527
2527
self . session . span_err ( span,
2528
- fmt ! ( "not a module: %s " ,
2528
+ fmt ! ( "not a module `%s` " ,
2529
2529
* self . session. str_of(
2530
2530
name) ) ) ;
2531
2531
return Failed ;
@@ -2976,7 +2976,7 @@ pub impl Resolver {
2976
2976
}
2977
2977
2978
2978
// We're out of luck.
2979
- debug ! ( "(resolving name in module) failed to resolve %s " ,
2979
+ debug ! ( "(resolving name in module) failed to resolve `%s` " ,
2980
2980
* self . session. str_of( name) ) ;
2981
2981
return Failed ;
2982
2982
}
@@ -4158,7 +4158,7 @@ pub impl Resolver {
4158
4158
// in the same disjunct, which is an
4159
4159
// error
4160
4160
self . session . span_err ( pattern. span ,
4161
- fmt ! ( "Identifier %s is bound more \
4161
+ fmt ! ( "Identifier `%s` is bound more \
4162
4162
than once in the same pattern",
4163
4163
path_to_str( path, self . session
4164
4164
. intr( ) ) ) ) ;
@@ -4199,7 +4199,7 @@ pub impl Resolver {
4199
4199
Some ( _) => {
4200
4200
self . session . span_err (
4201
4201
path. span ,
4202
- fmt ! ( "not an enum variant or constant: %s " ,
4202
+ fmt ! ( "`%s` is not an enum variant or constant" ,
4203
4203
* self . session. str_of(
4204
4204
* path. idents. last( ) ) ) ) ;
4205
4205
}
@@ -4227,7 +4227,7 @@ pub impl Resolver {
4227
4227
Some ( _) => {
4228
4228
self . session . span_err (
4229
4229
path. span ,
4230
- fmt ! ( "not an enum variant, struct or const: %s " ,
4230
+ fmt ! ( "`%s` is not an enum variant, struct or const" ,
4231
4231
* self . session. str_of(
4232
4232
* path. idents. last( ) ) ) ) ;
4233
4233
}
@@ -4723,8 +4723,8 @@ pub impl Resolver {
4723
4723
path. idents ) ;
4724
4724
if self . name_exists_in_scope_struct ( wrong_name) {
4725
4725
self . session . span_err ( expr. span ,
4726
- fmt ! ( "unresolved name: `%s`. \
4727
- Did you mean: `self.%s`?",
4726
+ fmt ! ( "unresolved name `%s`. \
4727
+ Did you mean `self.%s`?",
4728
4728
wrong_name,
4729
4729
wrong_name) ) ;
4730
4730
}
@@ -4734,13 +4734,13 @@ pub impl Resolver {
4734
4734
match self . find_best_match_for_name ( wrong_name, 5 ) {
4735
4735
Some ( m) => {
4736
4736
self . session . span_err ( expr. span ,
4737
- fmt ! ( "unresolved name: `%s`. \
4738
- Did you mean: `%s`?",
4737
+ fmt ! ( "unresolved name `%s`. \
4738
+ Did you mean `%s`?",
4739
4739
wrong_name, m) ) ;
4740
4740
}
4741
4741
None => {
4742
4742
self . session . span_err ( expr. span ,
4743
- fmt ! ( "unresolved name: `%s`." ,
4743
+ fmt ! ( "unresolved name `%s`." ,
4744
4744
wrong_name) ) ;
4745
4745
}
4746
4746
}
0 commit comments