From c6e905a79f7ba083b3f97728aa3a74fb0e03661b Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 25 May 2019 13:42:34 +0300 Subject: Colorize Rust code as HTML --- crates/ra_ide_api/src/snapshots/highlighting.html | 45 +++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 crates/ra_ide_api/src/snapshots/highlighting.html (limited to 'crates/ra_ide_api/src/snapshots/highlighting.html') diff --git a/crates/ra_ide_api/src/snapshots/highlighting.html b/crates/ra_ide_api/src/snapshots/highlighting.html new file mode 100644 index 000000000..bfc0a67b1 --- /dev/null +++ b/crates/ra_ide_api/src/snapshots/highlighting.html @@ -0,0 +1,45 @@ + + +

+#[derive(Clone, Debug)]
+struct Foo {
+    pub x: i32,
+    pub y: i32,
+}
+
+fn foo<T>() -> T {
+    unimplemented!();
+}
+
+// comment
+fn main() {
+    println!("Hello, {}!", 92);
+
+    let mut vec = Vec::new();
+    if true {
+        vec.push(Foo { x: 0, y: 1 });
+    }
+    unsafe { vec.set_len(0); }
+}
+
\ No newline at end of file -- cgit v1.2.3