diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-06-23 15:55:03 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-06-23 15:55:03 +0100 |
commit | c0b9ae55034fd29a86f52822634fcb1c1303e7f9 (patch) | |
tree | 4a97c8939ae27fa3c3f30fa46729383a71b810e7 /crates/ra_syntax | |
parent | 3e09dbba94de103d4d7a211ec578b049d0adc3c7 (diff) | |
parent | 76ddface089886c88b8b29e3893119f38ef26aab (diff) |
Merge #5004
5004: Fix panic in split/merge import assists r=matklad a=lnicola
Fixes #4368 #4905
Not sure if this is the best solution here. Maybe the `make` functions should be fallible? We generally seem to be playing whack-a-mole with panics in assists, although most of them are `unwrap`s in the assist code.
Co-authored-by: Laurențiu Nicola <[email protected]>
Diffstat (limited to 'crates/ra_syntax')
3 files changed, 18 insertions, 3 deletions
diff --git a/crates/ra_syntax/test_data/parser/err/0004_use_path_bad_segment.rast b/crates/ra_syntax/test_data/parser/err/0004_use_path_bad_segment.rast index 8c6b89dc2..b3bcf472a 100644 --- a/crates/ra_syntax/test_data/parser/err/0004_use_path_bad_segment.rast +++ b/crates/ra_syntax/test_data/parser/err/0004_use_path_bad_segment.rast | |||
@@ -9,8 +9,7 @@ [email protected] | |||
9 | [email protected] | 9 | [email protected] |
10 | [email protected] "foo" | 10 | [email protected] "foo" |
11 | [email protected] "::" | 11 | [email protected] "::" |
12 | [email protected] | 12 | [email protected] |
13 | [email protected] | 13 | [email protected] "92" |
14 | [email protected] "92" | ||
15 | [email protected] ";" | 14 | [email protected] ";" |
16 | error 9..9: expected identifier | 15 | error 9..9: expected identifier |
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0015_empty_segment.rast b/crates/ra_syntax/test_data/parser/inline/err/0015_empty_segment.rast new file mode 100644 index 000000000..da8505607 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/err/0015_empty_segment.rast | |||
@@ -0,0 +1,15 @@ | |||
1 | [email protected] | ||
2 | [email protected] | ||
3 | [email protected] "use" | ||
4 | [email protected] " " | ||
5 | [email protected] | ||
6 | [email protected] | ||
7 | [email protected] | ||
8 | [email protected] | ||
9 | [email protected] "crate" | ||
10 | [email protected] "::" | ||
11 | [email protected] | ||
12 | [email protected] ";" | ||
13 | [email protected] "\n" | ||
14 | error 11..11: expected identifier | ||
15 | error 12..12: expected SEMICOLON | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0015_empty_segment.rs b/crates/ra_syntax/test_data/parser/inline/err/0015_empty_segment.rs new file mode 100644 index 000000000..7510664e1 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/err/0015_empty_segment.rs | |||
@@ -0,0 +1 @@ | |||
use crate::; | |||