@@ -944,7 +944,7 @@ impl<'a, 'hash, 'tcx> StrictVersionHashVisitor<'a, 'hash, 'tcx> {
944
944
match * tt {
945
945
tokenstream:: TokenTree :: Token ( span, ref token) => {
946
946
hash_span ! ( self , span) ;
947
- self . hash_token ( token) ;
947
+ self . hash_token ( token, span ) ;
948
948
}
949
949
tokenstream:: TokenTree :: Delimited ( span, ref delimited) => {
950
950
hash_span ! ( self , span) ;
@@ -978,15 +978,17 @@ impl<'a, 'hash, 'tcx> StrictVersionHashVisitor<'a, 'hash, 'tcx> {
978
978
}
979
979
self . hash_discriminant ( separator) ;
980
980
if let Some ( ref separator) = * separator {
981
- self . hash_token ( separator) ;
981
+ self . hash_token ( separator, span ) ;
982
982
}
983
983
op. hash ( self . st ) ;
984
984
num_captures. hash ( self . st ) ;
985
985
}
986
986
}
987
987
}
988
988
989
- fn hash_token ( & mut self , token : & token:: Token ) {
989
+ fn hash_token ( & mut self ,
990
+ token : & token:: Token ,
991
+ error_reporting_span : Span ) {
990
992
self . hash_discriminant ( token) ;
991
993
match * token {
992
994
token:: Token :: Eq |
@@ -1061,7 +1063,7 @@ impl<'a, 'hash, 'tcx> StrictVersionHashVisitor<'a, 'hash, 'tcx> {
1061
1063
let msg = format ! ( "Quasi-quoting might make incremental \
1062
1064
compilation very inefficient: {:?}",
1063
1065
non_terminal) ;
1064
- self . tcx . sess . warn ( & msg[ ..] ) ;
1066
+ self . tcx . sess . span_warn ( error_reporting_span , & msg[ ..] ) ;
1065
1067
}
1066
1068
1067
1069
non_terminal. hash ( self . st ) ;
0 commit comments