1
Fork 0

Rollup merge of #99911 - cjgillot:no-guess, r=davidtwco

Remove some uses of `guess_head_span`

That function cuts a span at the first occurrence of `{`.  Using `def_span` is almost always more precise.
This commit is contained in:
Matthias Krüger 2022-08-01 16:49:31 +02:00 committed by GitHub
commit 8db3d7cfb6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 97 additions and 114 deletions

View file

@ -1946,7 +1946,6 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
));
let original_span = err.span.primary_span().unwrap();
let original_span = self.tcx.sess.source_map().guess_head_span(original_span);
let mut span = MultiSpan::from_span(original_span);
let message = outer_generator