fix the span in the suggestion of remove question mark
This commit is contained in:
parent
2e6ac7fe5b
commit
2195fa6a9b
3 changed files with 32 additions and 1 deletions
|
@ -764,7 +764,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
|
|||
Some(ty) if expected == ty => {
|
||||
let source_map = self.tcx.sess.source_map();
|
||||
err.span_suggestion(
|
||||
source_map.end_point(cause.span),
|
||||
source_map.end_point(cause.span()),
|
||||
"try removing this `?`",
|
||||
"",
|
||||
Applicability::MachineApplicable,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue