]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #81860 - osa1:issue81800, r=estebank
authorDylan DPC <dylan.dpc@gmail.com>
Wed, 17 Feb 2021 22:51:14 +0000 (23:51 +0100)
committerGitHub <noreply@github.com>
Wed, 17 Feb 2021 22:51:14 +0000 (23:51 +0100)
Fix SourceMap::start_point

`start_point` needs to return the *first* character's span, but it would
previously call `find_width_of_character_at_span` which returns the span
of the *last* character. The implementation is now fixed.

Other changes:

- Docs for start_point, end_point, find_width_of_character_at_span
  updated

- Minor simplification in find_width_of_character_at_span code

Fixes #81800

1  2 
compiler/rustc_span/src/source_map.rs

Simple merge