From 05d67a9a0efafb3dd5087aad17d75aa88aa85178 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 1 Jul 2020 11:25:22 +0200 Subject: Move test data to test_data directory --- crates/ra_ide/test_data/highlight_unsafe.html | 53 +++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 crates/ra_ide/test_data/highlight_unsafe.html (limited to 'crates/ra_ide/test_data/highlight_unsafe.html') diff --git a/crates/ra_ide/test_data/highlight_unsafe.html b/crates/ra_ide/test_data/highlight_unsafe.html new file mode 100644 index 000000000..6936e949f --- /dev/null +++ b/crates/ra_ide/test_data/highlight_unsafe.html @@ -0,0 +1,53 @@ + + +
unsafe fn unsafe_fn() {}
+
+struct HasUnsafeFn;
+
+impl HasUnsafeFn {
+    unsafe fn unsafe_method(&self) {}
+}
+
+fn main() {
+    let x = &5 as *const usize;
+    unsafe {
+        unsafe_fn();
+        HasUnsafeFn.unsafe_method();
+        let y = *(x);
+        let z = -x;
+    }
+}
\ No newline at end of file -- cgit v1.2.3 From e1d6b7f7c48d82c3c03550bc702e64cd7d079c99 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 11 Jul 2020 14:50:00 +0200 Subject: Use dedicated semantic highlight tag for parameters closes #5106 --- crates/ra_ide/test_data/highlight_unsafe.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'crates/ra_ide/test_data/highlight_unsafe.html') diff --git a/crates/ra_ide/test_data/highlight_unsafe.html b/crates/ra_ide/test_data/highlight_unsafe.html index 6936e949f..7585fbb42 100644 --- a/crates/ra_ide/test_data/highlight_unsafe.html +++ b/crates/ra_ide/test_data/highlight_unsafe.html @@ -24,15 +24,16 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd .bool_literal { color: #BFE6EB; } .macro { color: #94BFF3; } .module { color: #AFD8AF; } +.value_param { color: #DCDCCC; } .variable { color: #DCDCCC; } .format_specifier { color: #CC696B; } .mutable { text-decoration: underline; } -.unresolved_reference { color: #FC5555; } .escape_sequence { color: #94BFF3; } - .keyword { color: #F0DFAF; font-weight: bold; } .keyword.unsafe { color: #BC8383; font-weight: bold; } .control { font-style: italic; } + +.unresolved_reference { color: #FC5555; text-decoration: wavy underline; }
unsafe fn unsafe_fn() {}
 
-- 
cgit v1.2.3


From 33832d43fcc10fd6da0edf004d575f3576d9e91d Mon Sep 17 00:00:00 2001
From: Leander Tentrup 
Date: Mon, 13 Jul 2020 22:59:42 +0200
Subject: Highlight punctuation as `HighlightTag::Operator`

---
 crates/ra_ide/test_data/highlight_unsafe.html | 28 +++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

(limited to 'crates/ra_ide/test_data/highlight_unsafe.html')

diff --git a/crates/ra_ide/test_data/highlight_unsafe.html b/crates/ra_ide/test_data/highlight_unsafe.html
index 7585fbb42..f41d775e4 100644
--- a/crates/ra_ide/test_data/highlight_unsafe.html
+++ b/crates/ra_ide/test_data/highlight_unsafe.html
@@ -35,20 +35,20 @@ pre                 { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
 
 .unresolved_reference { color: #FC5555; text-decoration: wavy underline; }
 
-
unsafe fn unsafe_fn() {}
+
unsafe fn unsafe_fn() {}
 
-struct HasUnsafeFn;
+struct HasUnsafeFn;
 
-impl HasUnsafeFn {
-    unsafe fn unsafe_method(&self) {}
-}
+impl HasUnsafeFn {
+    unsafe fn unsafe_method(&self) {}
+}
 
-fn main() {
-    let x = &5 as *const usize;
-    unsafe {
-        unsafe_fn();
-        HasUnsafeFn.unsafe_method();
-        let y = *(x);
-        let z = -x;
-    }
-}
\ No newline at end of file +fn main() { + let x = &5 as *const usize; + unsafe { + unsafe_fn(); + HasUnsafeFn.unsafe_method(); + let y = *(x); + let z = -x; + } +}
\ No newline at end of file -- cgit v1.2.3 From 119e71d9ea6448c49f597af3e0afefa6bf0f12ac Mon Sep 17 00:00:00 2001 From: Leander Tentrup Date: Wed, 15 Jul 2020 16:34:11 +0200 Subject: Add new `Punctuation` highlight tag --- crates/ra_ide/test_data/highlight_unsafe.html | 28 +++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'crates/ra_ide/test_data/highlight_unsafe.html') diff --git a/crates/ra_ide/test_data/highlight_unsafe.html b/crates/ra_ide/test_data/highlight_unsafe.html index f41d775e4..88ac91f9a 100644 --- a/crates/ra_ide/test_data/highlight_unsafe.html +++ b/crates/ra_ide/test_data/highlight_unsafe.html @@ -35,20 +35,20 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd .unresolved_reference { color: #FC5555; text-decoration: wavy underline; } -
unsafe fn unsafe_fn() {}
+
unsafe fn unsafe_fn() {}
 
-struct HasUnsafeFn;
+struct HasUnsafeFn;
 
-impl HasUnsafeFn {
-    unsafe fn unsafe_method(&self) {}
-}
+impl HasUnsafeFn {
+    unsafe fn unsafe_method(&self) {}
+}
 
-fn main() {
-    let x = &5 as *const usize;
-    unsafe {
-        unsafe_fn();
-        HasUnsafeFn.unsafe_method();
-        let y = *(x);
-        let z = -x;
-    }
-}
\ No newline at end of file +fn main() { + let x = &5 as *const usize; + unsafe { + unsafe_fn(); + HasUnsafeFn.unsafe_method(); + let y = *(x); + let z = -x; + } +}
\ No newline at end of file -- cgit v1.2.3 From 54ebb2ce301813a9b5b48d5abe97ace370cfa617 Mon Sep 17 00:00:00 2001 From: GrayJack Date: Mon, 20 Jul 2020 11:21:40 -0300 Subject: Handle semantic highlight when STAR is part of the `*{const, mut}` --- crates/ra_ide/test_data/highlight_unsafe.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ra_ide/test_data/highlight_unsafe.html') diff --git a/crates/ra_ide/test_data/highlight_unsafe.html b/crates/ra_ide/test_data/highlight_unsafe.html index 88ac91f9a..6c210bfa8 100644 --- a/crates/ra_ide/test_data/highlight_unsafe.html +++ b/crates/ra_ide/test_data/highlight_unsafe.html @@ -40,15 +40,15 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd struct HasUnsafeFn; impl HasUnsafeFn { - unsafe fn unsafe_method(&self) {} + unsafe fn unsafe_method(&self) {} } fn main() { - let x = &5 as *const usize; + let x = &5 as *const usize; unsafe { unsafe_fn(); HasUnsafeFn.unsafe_method(); let y = *(x); - let z = -x; + let z = -x; } }
\ No newline at end of file -- cgit v1.2.3 From a662228de41a8b35d61b2bd312d30d34623e2232 Mon Sep 17 00:00:00 2001 From: GrayJack Date: Mon, 20 Jul 2020 12:36:23 -0300 Subject: Assingment semantic highlight --- crates/ra_ide/test_data/highlight_unsafe.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ra_ide/test_data/highlight_unsafe.html') diff --git a/crates/ra_ide/test_data/highlight_unsafe.html b/crates/ra_ide/test_data/highlight_unsafe.html index 6c210bfa8..b81b6f1c3 100644 --- a/crates/ra_ide/test_data/highlight_unsafe.html +++ b/crates/ra_ide/test_data/highlight_unsafe.html @@ -44,11 +44,11 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd } fn main() { - let x = &5 as *const usize; + let x = &5 as *const usize; unsafe { unsafe_fn(); HasUnsafeFn.unsafe_method(); - let y = *(x); - let z = -x; + let y = *(x); + let z = -x; } } \ No newline at end of file -- cgit v1.2.3