aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-06-08 14:23:03 +0100
committerAleksey Kladov <[email protected]>2020-06-08 14:23:03 +0100
commit3b4d000250ae142288408cfe2abe7c10d4495c92 (patch)
tree815afbf6c0b7fa223a58f858212d9ae4ea9d073d /crates/ra_ide
parentc476f71bdf83e930ebe5c2ad2754f24ee0925c32 (diff)
Better unsafe highlihgting tests
Diffstat (limited to 'crates/ra_ide')
-rw-r--r--crates/ra_ide/src/snapshots/highlight_doctest.html3
-rw-r--r--crates/ra_ide/src/snapshots/highlight_injection.html3
-rw-r--r--crates/ra_ide/src/snapshots/highlight_strings.html3
-rw-r--r--crates/ra_ide/src/snapshots/highlight_unsafe.html5
-rw-r--r--crates/ra_ide/src/snapshots/highlighting.html3
-rw-r--r--crates/ra_ide/src/snapshots/rainbow_highlighting.html3
-rw-r--r--crates/ra_ide/src/syntax_highlighting/html.rs3
-rw-r--r--crates/ra_ide/src/syntax_highlighting/tests.rs2
8 files changed, 16 insertions, 9 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/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}