We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0caf535 commit f67a70dCopy full SHA for f67a70d
src/tools/rust-analyzer/crates/ide/src/references.rs
@@ -350,6 +350,27 @@ fn test() {
350
);
351
}
352
353
+ #[test]
354
+ fn test_access() {
355
+ check(
356
+ r#"
357
+struct S { f$0: u32 }
358
+
359
+#[test]
360
+fn test() {
361
+ let mut x = S { f: 92 };
362
+ x.f = 92;
363
+}
364
+"#,
365
+ expect![[r#"
366
+ f Field FileId(0) 11..17 11..12
367
368
+ FileId(0) 61..62 read test
369
+ FileId(0) 76..77 write test
370
+ "#]],
371
+ );
372
+ }
373
374
#[test]
375
fn test_struct_literal_after_space() {
376
check(
0 commit comments