aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src')
-rw-r--r--crates/ra_ide/src/references/classify.rs1
-rw-r--r--crates/ra_ide/src/snapshots/highlighting.html9
-rw-r--r--crates/ra_ide/src/syntax_highlighting.rs9
3 files changed, 18 insertions, 1 deletions
diff --git a/crates/ra_ide/src/references/classify.rs b/crates/ra_ide/src/references/classify.rs
index 65df2e335..ed98dbc13 100644
--- a/crates/ra_ide/src/references/classify.rs
+++ b/crates/ra_ide/src/references/classify.rs
@@ -178,7 +178,6 @@ pub(crate) fn classify_name_ref(
178 Some(NameDefinition { kind, container, visibility: None }) 178 Some(NameDefinition { kind, container, visibility: None })
179 } 179 }
180 PathResolution::GenericParam(par) => { 180 PathResolution::GenericParam(par) => {
181 // FIXME: get generic param def
182 let kind = NameKind::GenericParam(par); 181 let kind = NameKind::GenericParam(par);
183 Some(NameDefinition { kind, container, visibility }) 182 Some(NameDefinition { kind, container, visibility })
184 } 183 }
diff --git a/crates/ra_ide/src/snapshots/highlighting.html b/crates/ra_ide/src/snapshots/highlighting.html
index b39c4d371..4166a8f90 100644
--- a/crates/ra_ide/src/snapshots/highlighting.html
+++ b/crates/ra_ide/src/snapshots/highlighting.html
@@ -9,6 +9,7 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
9.parameter { color: #94BFF3; } 9.parameter { color: #94BFF3; }
10.builtin { color: #DD6718; } 10.builtin { color: #DD6718; }
11.text { color: #DCDCCC; } 11.text { color: #DCDCCC; }
12.type { color: #7CB8BB; }
12.attribute { color: #94BFF3; } 13.attribute { color: #94BFF3; }
13.literal { color: #BFEBBF; } 14.literal { color: #BFEBBF; }
14.macro { color: #94BFF3; } 15.macro { color: #94BFF3; }
@@ -45,4 +46,12 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
45 <span class="keyword">let</span> <span class="variable">z</span> = &<span class="variable.mut">y</span>; 46 <span class="keyword">let</span> <span class="variable">z</span> = &<span class="variable.mut">y</span>;
46 47
47 <span class="variable.mut">y</span>; 48 <span class="variable.mut">y</span>;
49}
50
51<span class="keyword">enum</span> <span class="type">E</span>&lt;<span class="type">X</span>&gt; {
52 <span class="constant">V</span>(<span class="type">X</span>)
53}
54
55<span class="keyword">impl</span>&lt;<span class="type">X</span>&gt; <span class="type">E</span>&lt;<span class="type">X</span>&gt; {
56 <span class="keyword">fn</span> <span class="function">new</span>&lt;<span class="type">T</span>&gt;() -&gt; <span class="type">E</span>&lt;<span class="type">T</span>&gt; {}
48}</code></pre> \ No newline at end of file 57}</code></pre> \ No newline at end of file
diff --git a/crates/ra_ide/src/syntax_highlighting.rs b/crates/ra_ide/src/syntax_highlighting.rs
index e6a79541f..20eefeb57 100644
--- a/crates/ra_ide/src/syntax_highlighting.rs
+++ b/crates/ra_ide/src/syntax_highlighting.rs
@@ -255,6 +255,7 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
255.parameter { color: #94BFF3; } 255.parameter { color: #94BFF3; }
256.builtin { color: #DD6718; } 256.builtin { color: #DD6718; }
257.text { color: #DCDCCC; } 257.text { color: #DCDCCC; }
258.type { color: #7CB8BB; }
258.attribute { color: #94BFF3; } 259.attribute { color: #94BFF3; }
259.literal { color: #BFEBBF; } 260.literal { color: #BFEBBF; }
260.macro { color: #94BFF3; } 261.macro { color: #94BFF3; }
@@ -303,6 +304,14 @@ fn main() {
303 304
304 y; 305 y;
305} 306}
307
308enum E<X> {
309 V(X)
310}
311
312impl<X> E<X> {
313 fn new<T>() -> E<T> {}
314}
306"# 315"#
307 .trim(), 316 .trim(),
308 ); 317 );