aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/syntax_highlighting/tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src/syntax_highlighting/tests.rs')
-rw-r--r--crates/ra_ide/src/syntax_highlighting/tests.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/crates/ra_ide/src/syntax_highlighting/tests.rs b/crates/ra_ide/src/syntax_highlighting/tests.rs
index 09062c38e..f2c078d34 100644
--- a/crates/ra_ide/src/syntax_highlighting/tests.rs
+++ b/crates/ra_ide/src/syntax_highlighting/tests.rs
@@ -292,6 +292,13 @@ struct TypeForStaticMut {
292 292
293static mut global_mut: TypeForStaticMut = TypeForStaticMut { a: 0 }; 293static mut global_mut: TypeForStaticMut = TypeForStaticMut { a: 0 };
294 294
295#[repr(packed)]
296struct Packed {
297 a: u16,
298 b: u8,
299 c: u32,
300}
301
295fn main() { 302fn main() {
296 let x = &5 as *const usize; 303 let x = &5 as *const usize;
297 let u = Union { b: 0 }; 304 let u = Union { b: 0 };
@@ -306,6 +313,10 @@ fn main() {
306 let y = *(x); 313 let y = *(x);
307 let z = -x; 314 let z = -x;
308 let a = global_mut.a; 315 let a = global_mut.a;
316 let packed = Packed { a: 0, b: 0, c: 0 };
317 let a = &packed.a;
318 let b = &packed.b;
319 let c = &packed.c;
309 } 320 }
310} 321}
311"# 322"#