]> git.lizzy.rs Git - rust.git/commit
Auto merge of #13871 - lowr:fix/extract-module-merge-multiple-ranges, r=lnicola
authorbors <bors@rust-lang.org>
Sat, 31 Dec 2022 14:51:27 +0000 (14:51 +0000)
committerbors <bors@rust-lang.org>
Sat, 31 Dec 2022 14:51:27 +0000 (14:51 +0000)
commitf31733b1d61dd8ab2012bbe466838be244a96dd3
tree8ff20bc95b065992ae49e368e72da50832765801
parentda15d92a3204da419bad70cbfceb2676bfe0b528
parent332dd6ad6ec0992137f515845ae832fb807123e8
Auto merge of #13871 - lowr:fix/extract-module-merge-multiple-ranges, r=lnicola

fix: merge multiple intersecting ranges

Fixes #13791

In `check_intersection_and_push()`, there may exist two ranges we should merge with the new one. We've been assuming there should be only one range that intersects, which lead to [this assertion](https://github.com/rust-lang/rust-analyzer/blob/da15d92a3204da419bad70cbfceb2676bfe0b528/crates/text-edit/src/lib.rs#L192) to fail under specific circumstances.