From 757e593b253b4df7e6fc8bf15a4d4f34c9d484c5 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 27 Nov 2019 21:32:33 +0300 Subject: rename ra_ide_api -> ra_ide --- crates/ra_ide/src/snapshots/highlighting.html | 48 ++++++++++++++++++++++ .../ra_ide/src/snapshots/rainbow_highlighting.html | 33 +++++++++++++++ 2 files changed, 81 insertions(+) create mode 100644 crates/ra_ide/src/snapshots/highlighting.html create mode 100644 crates/ra_ide/src/snapshots/rainbow_highlighting.html (limited to 'crates/ra_ide/src/snapshots') diff --git a/crates/ra_ide/src/snapshots/highlighting.html b/crates/ra_ide/src/snapshots/highlighting.html new file mode 100644 index 000000000..b39c4d371 --- /dev/null +++ b/crates/ra_ide/src/snapshots/highlighting.html @@ -0,0 +1,48 @@ + + +
#[derive(Clone, Debug)]
+struct Foo {
+    pub x: i32,
+    pub y: i32,
+}
+
+fn foo<T>() -> T {
+    unimplemented!();
+    foo::<i32>();
+}
+
+// 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); }
+
+    let mut x = 42;
+    let y = &mut x;
+    let z = &y;
+
+    y;
+}
\ No newline at end of file diff --git a/crates/ra_ide/src/snapshots/rainbow_highlighting.html b/crates/ra_ide/src/snapshots/rainbow_highlighting.html new file mode 100644 index 000000000..79f11ea80 --- /dev/null +++ b/crates/ra_ide/src/snapshots/rainbow_highlighting.html @@ -0,0 +1,33 @@ + + +
fn main() {
+    let hello = "hello";
+    let x = hello.to_string();
+    let y = hello.to_string();
+
+    let x = "other color please!";
+    let y = x.to_string();
+}
+
+fn bar() {
+    let mut hello = "hello";
+}
\ No newline at end of file -- cgit v1.2.3