diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-05-25 03:30:47 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-05-25 03:30:47 +0100 |
commit | 8b049ec393230e4b9fea3022a3ebf34e2af5395d (patch) | |
tree | d75b9290e907898027eab2e723ed1c0040e43e4e /crates/ide/src/inlay_hints.rs | |
parent | 6d473c0a8f6acecbae680b69528b3f88a31dc5fc (diff) | |
parent | d75277b66b07e3fa4fed5088b92c6f65b2de8fe9 (diff) |
Merge #8942
8942: Add `library` semantic token modifier to items from other crates r=arzg a=arzg
Closes #5772.
A lot of code here is pretty repetitive; please let me know if you have any ideas how to improve it, or whether it’s fine as-is.
Side-note: How can I add tests for this? I don’t see a way for the test Rust code in `test_highlighting` to reference other crates to observe the new behaviour.
Co-authored-by: Aramis Razzaghipour <[email protected]>
Diffstat (limited to 'crates/ide/src/inlay_hints.rs')
-rw-r--r-- | crates/ide/src/inlay_hints.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ide/src/inlay_hints.rs b/crates/ide/src/inlay_hints.rs index 8f490e922..85f887737 100644 --- a/crates/ide/src/inlay_hints.rs +++ b/crates/ide/src/inlay_hints.rs | |||
@@ -219,7 +219,7 @@ fn hint_iterator( | |||
219 | ) -> Option<SmolStr> { | 219 | ) -> Option<SmolStr> { |
220 | let db = sema.db; | 220 | let db = sema.db; |
221 | let strukt = ty.strip_references().as_adt()?; | 221 | let strukt = ty.strip_references().as_adt()?; |
222 | let krate = strukt.krate(db); | 222 | let krate = strukt.module(db).krate(); |
223 | if krate != famous_defs.core()? { | 223 | if krate != famous_defs.core()? { |
224 | return None; | 224 | return None; |
225 | } | 225 | } |