diff options
author | Aleksey Kladov <[email protected]> | 2021-06-13 17:27:14 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2021-06-13 17:27:24 +0100 |
commit | dec207f56a7b16075f68dcb89138d93a7eecdf43 (patch) | |
tree | a9c198dde6ff1845ee3bf634bc0de888f4ef40e5 /crates/ide/src/diagnostics/field_shorthand.rs | |
parent | a1940d8c75bee8c319e7e7f19607bdc4b01c28d4 (diff) |
minor: simplify
Diffstat (limited to 'crates/ide/src/diagnostics/field_shorthand.rs')
-rw-r--r-- | crates/ide/src/diagnostics/field_shorthand.rs | 10 |
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)] |
100 | mod tests { | 100 | mod 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#" |
107 | struct A { a: &'static str } | 107 | struct A { a: &'static str } |
108 | fn main() { A { a: "hello" } } | 108 | fn main() { A { a: "hello" } } |
109 | "#, | 109 | "#, |
110 | ); | 110 | ); |
111 | check_no_diagnostics( | 111 | check_diagnostics( |
112 | r#" | 112 | r#" |
113 | struct A(usize); | 113 | struct A(usize); |
114 | fn main() { A { 0: 0 } } | 114 | fn 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#" |
159 | struct A { a: &'static str } | 159 | struct A { a: &'static str } |
160 | fn f(a: A) { let A { a: hello } = a; } | 160 | fn f(a: A) { let A { a: hello } = a; } |
161 | "#, | 161 | "#, |
162 | ); | 162 | ); |
163 | check_no_diagnostics( | 163 | check_diagnostics( |
164 | r#" | 164 | r#" |
165 | struct A(usize); | 165 | struct A(usize); |
166 | fn f(a: A) { let A { 0: 0 } = a; } | 166 | fn f(a: A) { let A { 0: 0 } = a; } |