aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/diagnostics/field_shorthand.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide/src/diagnostics/field_shorthand.rs')
-rw-r--r--crates/ide/src/diagnostics/field_shorthand.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ide/src/diagnostics/field_shorthand.rs b/crates/ide/src/diagnostics/field_shorthand.rs
index 01bd2dba6..e885a398e 100644
--- a/crates/ide/src/diagnostics/field_shorthand.rs
+++ b/crates/ide/src/diagnostics/field_shorthand.rs
@@ -98,17 +98,17 @@ fn check_pat_field_shorthand(
98 98
99#[cfg(test)] 99#[cfg(test)]
100mod tests { 100mod tests {
101 use crate::diagnostics::tests::{check_fix, check_no_diagnostics}; 101 use crate::diagnostics::tests::{check_diagnostics, check_fix};
102 102
103 #[test] 103 #[test]
104 fn test_check_expr_field_shorthand() { 104 fn test_check_expr_field_shorthand() {
105 check_no_diagnostics( 105 check_diagnostics(
106 r#" 106 r#"
107struct A { a: &'static str } 107struct A { a: &'static str }
108fn main() { A { a: "hello" } } 108fn main() { A { a: "hello" } }
109"#, 109"#,
110 ); 110 );
111 check_no_diagnostics( 111 check_diagnostics(
112 r#" 112 r#"
113struct A(usize); 113struct A(usize);
114fn main() { A { 0: 0 } } 114fn main() { A { 0: 0 } }
@@ -154,13 +154,13 @@ fn main() {
154 154
155 #[test] 155 #[test]
156 fn test_check_pat_field_shorthand() { 156 fn test_check_pat_field_shorthand() {
157 check_no_diagnostics( 157 check_diagnostics(
158 r#" 158 r#"
159struct A { a: &'static str } 159struct A { a: &'static str }
160fn f(a: A) { let A { a: hello } = a; } 160fn f(a: A) { let A { a: hello } = a; }
161"#, 161"#,
162 ); 162 );
163 check_no_diagnostics( 163 check_diagnostics(
164 r#" 164 r#"
165struct A(usize); 165struct A(usize);
166fn f(a: A) { let A { 0: 0 } = a; } 166fn f(a: A) { let A { 0: 0 } = a; }