rust/crates/ra_ide
bors[bot] 3e09dbba94
Merge #5002
5002: Fix underflow panic when doctests are at top of file r=Nashenas88 a=Nashenas88

While debugging a comment at the top of a test string, I discovered that the offset calculations could underflow and panic. This only seemed to occur in tests, I assume because it's running a debug mode. The wrapping is quickly fixed later on in release mode, which is why this seems to have gone unnoticed. The new checks ensure the value is always positive or zero.

Co-authored-by: Paul Daniel Faria <nashenas88@users.noreply.github.com>
2020-06-23 13:25:43 +00:00
..
src Merge #5002 2020-06-23 13:25:43 +00:00
Cargo.toml Allow SSR to match type references, items, paths and patterns 2020-06-22 21:42:55 +10:00