@@ -2820,9 +2820,10 @@ impl<'a> Resolver<'a> {
2820
2820
. contains_key ( & name) {
2821
2821
match import_resolution. type_target {
2822
2822
Some ( ref target) if !target. shadowable => {
2823
- self . session . span_err ( import_span,
2824
- "import conflicts with imported \
2825
- crate in this module") ;
2823
+ let msg = format ! ( "import `{}` conflicts with imported \
2824
+ crate in this module",
2825
+ token:: get_name( name) . get( ) ) ;
2826
+ self . session . span_err ( import_span, msg. as_slice ( ) ) ;
2826
2827
}
2827
2828
Some ( _) | None => { }
2828
2829
}
@@ -2843,9 +2844,10 @@ impl<'a> Resolver<'a> {
2843
2844
match * name_bindings. value_def . borrow ( ) {
2844
2845
None => { }
2845
2846
Some ( ref value) => {
2846
- self . session . span_err ( import_span,
2847
- "import conflicts with value \
2848
- in this module") ;
2847
+ let msg = format ! ( "import `{}` conflicts with value \
2848
+ in this module",
2849
+ token:: get_name( name) . get( ) ) ;
2850
+ self . session . span_err ( import_span, msg. as_slice ( ) ) ;
2849
2851
match value. value_span {
2850
2852
None => { }
2851
2853
Some ( span) => {
@@ -2865,9 +2867,10 @@ impl<'a> Resolver<'a> {
2865
2867
match * name_bindings. type_def . borrow ( ) {
2866
2868
None => { }
2867
2869
Some ( ref ty) => {
2868
- self . session . span_err ( import_span,
2869
- "import conflicts with type in \
2870
- this module") ;
2870
+ let msg = format ! ( "import `{}` conflicts with type in \
2871
+ this module",
2872
+ token:: get_name( name) . get( ) ) ;
2873
+ self . session . span_err ( import_span, msg. as_slice ( ) ) ;
2871
2874
match ty. type_span {
2872
2875
None => { }
2873
2876
Some ( span) => {
0 commit comments