Skip to content

Commit

Permalink
Add excluded extern-prelude IDE resolution test
Browse files Browse the repository at this point in the history
  • Loading branch information
Veykril committed Oct 5, 2024
1 parent 6b286bc commit a219568
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@
.invalid_escape_sequence { color: #FC5555; text-decoration: wavy underline; }
.unresolved_reference { color: #FC5555; text-decoration: wavy underline; }
</style>
<pre><code><span class="keyword">extern</span> <span class="keyword">crate</span> <span class="module crate_root default_library library">std</span><span class="semicolon">;</span>
<pre><code><span class="keyword">extern</span> <span class="keyword">crate</span> <span class="self_keyword crate_root public">self</span> <span class="keyword">as</span> <span class="module crate_root declaration">this</span><span class="semicolon">;</span>
<span class="keyword">extern</span> <span class="keyword">crate</span> <span class="module crate_root default_library library">std</span><span class="semicolon">;</span>
<span class="keyword">extern</span> <span class="keyword">crate</span> <span class="module crate_root default_library library">alloc</span> <span class="keyword">as</span> <span class="module crate_root declaration">abc</span><span class="semicolon">;</span>
<span class="keyword">extern</span> <span class="keyword">crate</span> <span class="unresolved_reference">unresolved</span> <span class="keyword">as</span> <span class="module crate_root declaration">definitely_unresolved</span><span class="semicolon">;</span>
<span class="keyword">extern</span> <span class="keyword">crate</span> <span class="unresolved_reference">test</span> <span class="keyword">as</span> <span class="module crate_root declaration">opt_in_crate</span><span class="semicolon">;</span>
</code></pre>
Original file line number Diff line number Diff line change
Expand Up @@ -874,14 +874,18 @@ pub fn block_comments2() {}
fn test_extern_crate() {
check_highlighting(
r#"
//- /main.rs crate:main deps:std,alloc
//- /main.rs crate:main deps:std,alloc,test extern-prelude:std,alloc
extern crate self as this;
extern crate std;
extern crate alloc as abc;
extern crate unresolved as definitely_unresolved;
extern crate test as opt_in_crate;
//- /std/lib.rs crate:std
pub struct S;
//- /alloc/lib.rs crate:alloc
pub struct A
pub struct A;
//- /test/lib.rs crate:test
pub struct T;
"#,
expect_file!["./test_data/highlight_extern_crate.html"],
false,
Expand Down

0 comments on commit a219568

Please sign in to comment.