From 4abe03879bbd11536fbb51b30342cdad74317025 Mon Sep 17 00:00:00 2001 From: Ekaterina Babshukova Date: Thu, 18 Jul 2019 18:49:32 +0300 Subject: highlight mutable variables differently --- crates/ra_ide_api/src/snapshots/highlighting.html | 45 +++++++++++++--------- .../src/snapshots/rainbow_highlighting.html | 29 +++++++------- 2 files changed, 41 insertions(+), 33 deletions(-) (limited to 'crates/ra_ide_api/src/snapshots') diff --git a/crates/ra_ide_api/src/snapshots/highlighting.html b/crates/ra_ide_api/src/snapshots/highlighting.html index d79d35bf3..709816d0d 100644 --- a/crates/ra_ide_api/src/snapshots/highlighting.html +++ b/crates/ra_ide_api/src/snapshots/highlighting.html @@ -1,21 +1,22 @@
#[derive(Clone, Debug)]
 struct Foo {
@@ -32,9 +33,15 @@ pre        { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padding: 0.4e
 fn main() {
     println!("Hello, {}!", 92);
 
-    let mut vec = Vec::new();
+    let mut vec = Vec::new();
     if true {
-        vec.push(Foo { x: 0, y: 1 });
+        vec.push(Foo { x: 0, y: 1 });
     }
-    unsafe { vec.set_len(0); }
+    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_api/src/snapshots/rainbow_highlighting.html b/crates/ra_ide_api/src/snapshots/rainbow_highlighting.html index 729d129d0..ad3935b5d 100644 --- a/crates/ra_ide_api/src/snapshots/rainbow_highlighting.html +++ b/crates/ra_ide_api/src/snapshots/rainbow_highlighting.html @@ -1,21 +1,22 @@
fn main() {
     let hello = "hello";
-- 
cgit v1.2.3