diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-11-25 02:42:17 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-11-25 02:42:17 +0000 |
commit | a888441c4745c3d72bee737c69873dfc9f52f4bb (patch) | |
tree | c1593cd79a2c0d111f62898f62126c5b01cf9692 /crates/ra_ide_api/src/snapshots/highlighting.html | |
parent | f7f9757b6b144385ab8ce57b15764473b1f57331 (diff) | |
parent | ceb13a0494bed37b233bcaaeee70bfae5fefeccc (diff) |
Merge #2392
2392: Fix panic during the expansion of `column!` r=edwin0cheng a=marcogroppo
Fixes #2379. Well, this isn't the "proper" fix but it doesn't hurt, IMHO.
The problem is that `to_col_number`, called by `column_expand`, receives a position number that isn't included in the text range of the file. My (very limited) understanding is that the text is the one of the original file, while `pos` is relative to something else, probably the text of the macro. Notice that in this case the `column!` expansion seems to be triggered by `assert_eq!`, so we're in the middle of another expansion. This PR simply avoids the panic by checking the length of the text.
r? @edwin0cheng
Co-authored-by: Marco Groppo <[email protected]>
Diffstat (limited to 'crates/ra_ide_api/src/snapshots/highlighting.html')
0 files changed, 0 insertions, 0 deletions