From 78fe6133c4908aefcf5c690e665abba9ef2389eb Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Sun, 10 Jan 2021 13:33:03 +0100 Subject: Split punctuation semantic highlighting up into more tags --- .../test_data/highlight_unsafe.html | 88 +++++++++++----------- 1 file changed, 44 insertions(+), 44 deletions(-) (limited to 'crates/ide/src/syntax_highlighting/test_data/highlight_unsafe.html') diff --git a/crates/ide/src/syntax_highlighting/test_data/highlight_unsafe.html b/crates/ide/src/syntax_highlighting/test_data/highlight_unsafe.html index e3a0aa317..56a4380fb 100644 --- a/crates/ide/src/syntax_highlighting/test_data/highlight_unsafe.html +++ b/crates/ide/src/syntax_highlighting/test_data/highlight_unsafe.html @@ -36,65 +36,65 @@ 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() {}
 
-union Union {
-    a: u32,
-    b: f32,
-}
+union Union {
+    a: u32,
+    b: f32,
+}
 
-struct HasUnsafeFn;
+struct HasUnsafeFn;
 
-impl HasUnsafeFn {
-    unsafe fn unsafe_method(&self) {}
-}
+impl HasUnsafeFn {
+    unsafe fn unsafe_method(&self) {}
+}
 
-struct TypeForStaticMut {
-    a: u8
-}
+struct TypeForStaticMut {
+    a: u8
+}
 
-static mut global_mut: TypeForStaticMut = TypeForStaticMut { a: 0 };
+static mut global_mut: TypeForStaticMut = TypeForStaticMut { a: 0 };
 
-#[repr(packed)]
-struct Packed {
-    a: u16,
-}
+#[repr(packed)]
+struct Packed {
+    a: u16,
+}
 
-trait DoTheAutoref {
-    fn calls_autoref(&self);
-}
+trait DoTheAutoref {
+    fn calls_autoref(&self);
+}
 
-impl DoTheAutoref for u16 {
-    fn calls_autoref(&self) {}
-}
+impl DoTheAutoref for u16 {
+    fn calls_autoref(&self) {}
+}
 
-fn main() {
-    let x = &5 as *const _ as *const usize;
-    let u = Union { b: 0 };
-    unsafe {
+fn main() {
+    let x = &5 as *const _ as *const usize;
+    let u = Union { b: 0 };
+    unsafe {
         // unsafe fn and method calls
-        unsafe_fn();
-        let b = u.b;
-        match u {
-            Union { b: 0 } => (),
-            Union { a } => (),
-        }
-        HasUnsafeFn.unsafe_method();
+        unsafe_fn();
+        let b = u.b;
+        match u {
+            Union { b: 0 } => (),
+            Union { a } => (),
+        }
+        HasUnsafeFn.unsafe_method();
 
         // unsafe deref
-        let y = *x;
+        let y = *x;
 
         // unsafe access to a static mut
-        let a = global_mut.a;
+        let a = global_mut.a;
 
         // unsafe ref of packed fields
-        let packed = Packed { a: 0 };
-        let a = &packed.a;
-        let ref a = packed.a;
-        let Packed { ref a } = packed;
-        let Packed { a: ref _a } = packed;
+        let packed = Packed { a: 0 };
+        let a = &packed.a;
+        let ref a = packed.a;
+        let Packed { ref a } = packed;
+        let Packed { a: ref _a } = packed;
 
         // unsafe auto ref of packed field
-        packed.a.calls_autoref();
-    }
-}
\ No newline at end of file + packed.a.calls_autoref(); + } +}
\ No newline at end of file -- cgit v1.2.3