From 11c0a5bb60f9377526a588c11c68d5471ae46aa3 Mon Sep 17 00:00:00 2001 From: Matthew Jasper Date: Sun, 10 May 2020 16:08:28 +0100 Subject: Highlight mutable statics as mutable --- crates/ra_ide/src/syntax_highlighting/tests.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'crates/ra_ide/src/syntax_highlighting/tests.rs') diff --git a/crates/ra_ide/src/syntax_highlighting/tests.rs b/crates/ra_ide/src/syntax_highlighting/tests.rs index d2926ba78..13894869c 100644 --- a/crates/ra_ide/src/syntax_highlighting/tests.rs +++ b/crates/ra_ide/src/syntax_highlighting/tests.rs @@ -17,6 +17,8 @@ struct Foo { pub y: i32, } +static mut STATIC_MUT: i32 = 0; + fn foo<'a, T>() -> T { foo::<'a, i32>() } @@ -40,7 +42,10 @@ fn main() { let x = 92; vec.push(Foo { x, y: 1 }); } - unsafe { vec.set_len(0); } + unsafe { + vec.set_len(0); + STATIC_MUT = 1; + } let mut x = 42; let y = &mut x; -- cgit v1.2.3