diff options
Diffstat (limited to 'crates/ra_ide/src')
9 files changed, 18 insertions, 15 deletions
diff --git a/crates/ra_ide/src/snapshots/highlight_doctest.html b/crates/ra_ide/src/snapshots/highlight_doctest.html index 2f2d8c900..0ae8c7efc 100644 --- a/crates/ra_ide/src/snapshots/highlight_doctest.html +++ b/crates/ra_ide/src/snapshots/highlight_doctest.html | |||
@@ -10,7 +10,8 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd | |||
10 | .string_literal { color: #CC9393; } | 10 | .string_literal { color: #CC9393; } |
11 | .field { color: #94BFF3; } | 11 | .field { color: #94BFF3; } |
12 | .function { color: #93E0E3; } | 12 | .function { color: #93E0E3; } |
13 | .operator.unsafe { color: #E28C14; } | 13 | .function.unsafe { color: #BC8383; } |
14 | .operator.unsafe { color: #BC8383; } | ||
14 | .parameter { color: #94BFF3; } | 15 | .parameter { color: #94BFF3; } |
15 | .text { color: #DCDCCC; } | 16 | .text { color: #DCDCCC; } |
16 | .type { color: #7CB8BB; } | 17 | .type { color: #7CB8BB; } |
diff --git a/crates/ra_ide/src/snapshots/highlight_injection.html b/crates/ra_ide/src/snapshots/highlight_injection.html index fcdc98201..dec06eb51 100644 --- a/crates/ra_ide/src/snapshots/highlight_injection.html +++ b/crates/ra_ide/src/snapshots/highlight_injection.html | |||
@@ -10,7 +10,8 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd | |||
10 | .string_literal { color: #CC9393; } | 10 | .string_literal { color: #CC9393; } |
11 | .field { color: #94BFF3; } | 11 | .field { color: #94BFF3; } |
12 | .function { color: #93E0E3; } | 12 | .function { color: #93E0E3; } |
13 | .operator.unsafe { color: #E28C14; } | 13 | .function.unsafe { color: #BC8383; } |
14 | .operator.unsafe { color: #BC8383; } | ||
14 | .parameter { color: #94BFF3; } | 15 | .parameter { color: #94BFF3; } |
15 | .text { color: #DCDCCC; } | 16 | .text { color: #DCDCCC; } |
16 | .type { color: #7CB8BB; } | 17 | .type { color: #7CB8BB; } |
diff --git a/crates/ra_ide/src/snapshots/highlight_strings.html b/crates/ra_ide/src/snapshots/highlight_strings.html index 6a5cf0e74..849eb3b73 100644 --- a/crates/ra_ide/src/snapshots/highlight_strings.html +++ b/crates/ra_ide/src/snapshots/highlight_strings.html | |||
@@ -10,7 +10,8 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd | |||
10 | .string_literal { color: #CC9393; } | 10 | .string_literal { color: #CC9393; } |
11 | .field { color: #94BFF3; } | 11 | .field { color: #94BFF3; } |
12 | .function { color: #93E0E3; } | 12 | .function { color: #93E0E3; } |
13 | .operator.unsafe { color: #E28C14; } | 13 | .function.unsafe { color: #BC8383; } |
14 | .operator.unsafe { color: #BC8383; } | ||
14 | .parameter { color: #94BFF3; } | 15 | .parameter { color: #94BFF3; } |
15 | .text { color: #DCDCCC; } | 16 | .text { color: #DCDCCC; } |
16 | .type { color: #7CB8BB; } | 17 | .type { color: #7CB8BB; } |
diff --git a/crates/ra_ide/src/snapshots/highlight_unsafe.html b/crates/ra_ide/src/snapshots/highlight_unsafe.html index 17ffc727c..bd24e6e38 100644 --- a/crates/ra_ide/src/snapshots/highlight_unsafe.html +++ b/crates/ra_ide/src/snapshots/highlight_unsafe.html | |||
@@ -10,7 +10,8 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd | |||
10 | .string_literal { color: #CC9393; } | 10 | .string_literal { color: #CC9393; } |
11 | .field { color: #94BFF3; } | 11 | .field { color: #94BFF3; } |
12 | .function { color: #93E0E3; } | 12 | .function { color: #93E0E3; } |
13 | .operator.unsafe { color: #E28C14; } | 13 | .function.unsafe { color: #BC8383; } |
14 | .operator.unsafe { color: #BC8383; } | ||
14 | .parameter { color: #94BFF3; } | 15 | .parameter { color: #94BFF3; } |
15 | .text { color: #DCDCCC; } | 16 | .text { color: #DCDCCC; } |
16 | .type { color: #7CB8BB; } | 17 | .type { color: #7CB8BB; } |
@@ -42,7 +43,7 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd | |||
42 | <span class="keyword unsafe">unsafe</span> { | 43 | <span class="keyword unsafe">unsafe</span> { |
43 | <span class="function unsafe">unsafe_fn</span>(); | 44 | <span class="function unsafe">unsafe_fn</span>(); |
44 | <span class="struct">HasUnsafeFn</span>.<span class="function unsafe">unsafe_method</span>(); | 45 | <span class="struct">HasUnsafeFn</span>.<span class="function unsafe">unsafe_method</span>(); |
45 | <span class="keyword">let</span> <span class="variable declaration">y</span> = <span class="operator unsafe">*</span><span class="variable">x</span>; | 46 | <span class="keyword">let</span> <span class="variable declaration">y</span> = <span class="operator unsafe">*</span>(<span class="variable">x</span>); |
46 | <span class="keyword">let</span> <span class="variable declaration">z</span> = -<span class="variable">x</span>; | 47 | <span class="keyword">let</span> <span class="variable declaration">z</span> = -<span class="variable">x</span>; |
47 | } | 48 | } |
48 | }</code></pre> \ No newline at end of file | 49 | }</code></pre> \ No newline at end of file |
diff --git a/crates/ra_ide/src/snapshots/highlighting.html b/crates/ra_ide/src/snapshots/highlighting.html index 42c5f3e55..e34ff5a7d 100644 --- a/crates/ra_ide/src/snapshots/highlighting.html +++ b/crates/ra_ide/src/snapshots/highlighting.html | |||
@@ -10,7 +10,8 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd | |||
10 | .string_literal { color: #CC9393; } | 10 | .string_literal { color: #CC9393; } |
11 | .field { color: #94BFF3; } | 11 | .field { color: #94BFF3; } |
12 | .function { color: #93E0E3; } | 12 | .function { color: #93E0E3; } |
13 | .operator.unsafe { color: #E28C14; } | 13 | .function.unsafe { color: #BC8383; } |
14 | .operator.unsafe { color: #BC8383; } | ||
14 | .parameter { color: #94BFF3; } | 15 | .parameter { color: #94BFF3; } |
15 | .text { color: #DCDCCC; } | 16 | .text { color: #DCDCCC; } |
16 | .type { color: #7CB8BB; } | 17 | .type { color: #7CB8BB; } |
diff --git a/crates/ra_ide/src/snapshots/rainbow_highlighting.html b/crates/ra_ide/src/snapshots/rainbow_highlighting.html index 2dd61d20d..1ab06182c 100644 --- a/crates/ra_ide/src/snapshots/rainbow_highlighting.html +++ b/crates/ra_ide/src/snapshots/rainbow_highlighting.html | |||
@@ -10,7 +10,8 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd | |||
10 | .string_literal { color: #CC9393; } | 10 | .string_literal { color: #CC9393; } |
11 | .field { color: #94BFF3; } | 11 | .field { color: #94BFF3; } |
12 | .function { color: #93E0E3; } | 12 | .function { color: #93E0E3; } |
13 | .operator.unsafe { color: #E28C14; } | 13 | .function.unsafe { color: #BC8383; } |
14 | .operator.unsafe { color: #BC8383; } | ||
14 | .parameter { color: #94BFF3; } | 15 | .parameter { color: #94BFF3; } |
15 | .text { color: #DCDCCC; } | 16 | .text { color: #DCDCCC; } |
16 | .type { color: #7CB8BB; } | 17 | .type { color: #7CB8BB; } |
diff --git a/crates/ra_ide/src/syntax_highlighting.rs b/crates/ra_ide/src/syntax_highlighting.rs index 9ff7356c9..ab45c364a 100644 --- a/crates/ra_ide/src/syntax_highlighting.rs +++ b/crates/ra_ide/src/syntax_highlighting.rs | |||
@@ -480,12 +480,8 @@ fn highlight_element( | |||
480 | _ => h, | 480 | _ => h, |
481 | } | 481 | } |
482 | } | 482 | } |
483 | PREFIX_EXPR => { | 483 | T![*] => { |
484 | let prefix_expr = element.into_node().and_then(ast::PrefixExpr::cast)?; | 484 | let prefix_expr = element.parent().and_then(ast::PrefixExpr::cast)?; |
485 | match prefix_expr.op_kind() { | ||
486 | Some(ast::PrefixOp::Deref) => {} | ||
487 | _ => return None, | ||
488 | } | ||
489 | 485 | ||
490 | let expr = prefix_expr.expr()?; | 486 | let expr = prefix_expr.expr()?; |
491 | let ty = sema.type_of_expr(&expr)?; | 487 | let ty = sema.type_of_expr(&expr)?; |
diff --git a/crates/ra_ide/src/syntax_highlighting/html.rs b/crates/ra_ide/src/syntax_highlighting/html.rs index 7d946c98d..5bada6252 100644 --- a/crates/ra_ide/src/syntax_highlighting/html.rs +++ b/crates/ra_ide/src/syntax_highlighting/html.rs | |||
@@ -69,7 +69,8 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd | |||
69 | .string_literal { color: #CC9393; } | 69 | .string_literal { color: #CC9393; } |
70 | .field { color: #94BFF3; } | 70 | .field { color: #94BFF3; } |
71 | .function { color: #93E0E3; } | 71 | .function { color: #93E0E3; } |
72 | .operator.unsafe { color: #E28C14; } | 72 | .function.unsafe { color: #BC8383; } |
73 | .operator.unsafe { color: #BC8383; } | ||
73 | .parameter { color: #94BFF3; } | 74 | .parameter { color: #94BFF3; } |
74 | .text { color: #DCDCCC; } | 75 | .text { color: #DCDCCC; } |
75 | .type { color: #7CB8BB; } | 76 | .type { color: #7CB8BB; } |
diff --git a/crates/ra_ide/src/syntax_highlighting/tests.rs b/crates/ra_ide/src/syntax_highlighting/tests.rs index ba345d90a..021f8e7e2 100644 --- a/crates/ra_ide/src/syntax_highlighting/tests.rs +++ b/crates/ra_ide/src/syntax_highlighting/tests.rs | |||
@@ -274,7 +274,7 @@ fn main() { | |||
274 | unsafe { | 274 | unsafe { |
275 | unsafe_fn(); | 275 | unsafe_fn(); |
276 | HasUnsafeFn.unsafe_method(); | 276 | HasUnsafeFn.unsafe_method(); |
277 | let y = *x; | 277 | let y = *(x); |
278 | let z = -x; | 278 | let z = -x; |
279 | } | 279 | } |
280 | } | 280 | } |