]> git.lizzy.rs Git - rust.git/commitdiff
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)
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.


Trivial merge