]> git.lizzy.rs Git - rust.git/commit - src/tools/rustfmt
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)
commitd2232506629b3de71db97694889928bf91330566
treeef3d134ec91ee6a8a8a237a7d7b53494f0f450a9
parent40e3af5a2131f0f211e2f247faceae4008c94ec9
parent7e94641ee956989d57492975a1214fc79dcd1fce
Rollup merge of #81860 - osa1:issue81800, r=estebank

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
compiler/rustc_span/src/source_map.rs