diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-02-05 07:53:08 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-02-05 07:53:08 +0000 |
commit | 4d4c46aff8f9a7ce8c2f91fbe6c7c363f5d3e08c (patch) | |
tree | 90473c4a67ac70ee40fde54a25b11d7768c41593 /crates/ra_syntax/tests/data | |
parent | 94d5d0d7e893a50bdd22ce4366ca15f083218d22 (diff) | |
parent | de4c5e381fb1adc25143dcd67af6c87f6d9789ae (diff) |
Merge #742
742: Extern crate r=matklad a=flodiebold
This implements `extern crate` declarations by lowering them to (absolute) imports, and adds support for absolute paths. It also extracts the extern prelude from the per-module item map, and handles the special case of extern crates in the crate root adding to the extern prelude.
This means we finally resolve `Arc`, so it fixes #523 :smile:
Co-authored-by: Florian Diebold <[email protected]>
Diffstat (limited to 'crates/ra_syntax/tests/data')
-rw-r--r-- | crates/ra_syntax/tests/data/parser/inline/ok/0060_extern_crate.txt | 2 | ||||
-rw-r--r-- | crates/ra_syntax/tests/data/parser/ok/0007_extern_crate.txt | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0060_extern_crate.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0060_extern_crate.txt index 7ffdc7fbd..a7b428787 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0060_extern_crate.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0060_extern_crate.txt | |||
@@ -4,7 +4,7 @@ SOURCE_FILE@[0; 18) | |||
4 | WHITESPACE@[6; 7) | 4 | WHITESPACE@[6; 7) |
5 | CRATE_KW@[7; 12) | 5 | CRATE_KW@[7; 12) |
6 | WHITESPACE@[12; 13) | 6 | WHITESPACE@[12; 13) |
7 | NAME@[13; 16) | 7 | NAME_REF@[13; 16) |
8 | IDENT@[13; 16) "foo" | 8 | IDENT@[13; 16) "foo" |
9 | SEMI@[16; 17) | 9 | SEMI@[16; 17) |
10 | WHITESPACE@[17; 18) | 10 | WHITESPACE@[17; 18) |
diff --git a/crates/ra_syntax/tests/data/parser/ok/0007_extern_crate.txt b/crates/ra_syntax/tests/data/parser/ok/0007_extern_crate.txt index 5adf3f276..5558d952e 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0007_extern_crate.txt +++ b/crates/ra_syntax/tests/data/parser/ok/0007_extern_crate.txt | |||
@@ -4,7 +4,7 @@ SOURCE_FILE@[0; 43) | |||
4 | WHITESPACE@[6; 7) | 4 | WHITESPACE@[6; 7) |
5 | CRATE_KW@[7; 12) | 5 | CRATE_KW@[7; 12) |
6 | WHITESPACE@[12; 13) | 6 | WHITESPACE@[12; 13) |
7 | NAME@[13; 16) | 7 | NAME_REF@[13; 16) |
8 | IDENT@[13; 16) "foo" | 8 | IDENT@[13; 16) "foo" |
9 | SEMI@[16; 17) | 9 | SEMI@[16; 17) |
10 | WHITESPACE@[17; 18) | 10 | WHITESPACE@[17; 18) |
@@ -13,7 +13,7 @@ SOURCE_FILE@[0; 43) | |||
13 | WHITESPACE@[24; 25) | 13 | WHITESPACE@[24; 25) |
14 | CRATE_KW@[25; 30) | 14 | CRATE_KW@[25; 30) |
15 | WHITESPACE@[30; 31) | 15 | WHITESPACE@[30; 31) |
16 | NAME@[31; 34) | 16 | NAME_REF@[31; 34) |
17 | IDENT@[31; 34) "foo" | 17 | IDENT@[31; 34) "foo" |
18 | WHITESPACE@[34; 35) | 18 | WHITESPACE@[34; 35) |
19 | ALIAS@[35; 41) | 19 | ALIAS@[35; 41) |