aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_diagnostics/src/handlers/mismatched_arg_count.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide_diagnostics/src/handlers/mismatched_arg_count.rs')
-rw-r--r--crates/ide_diagnostics/src/handlers/mismatched_arg_count.rs22
1 files changed, 11 insertions, 11 deletions
diff --git a/crates/ide_diagnostics/src/handlers/mismatched_arg_count.rs b/crates/ide_diagnostics/src/handlers/mismatched_arg_count.rs
index ce313b2cc..a9b6d3870 100644
--- a/crates/ide_diagnostics/src/handlers/mismatched_arg_count.rs
+++ b/crates/ide_diagnostics/src/handlers/mismatched_arg_count.rs
@@ -26,7 +26,7 @@ mod tests {
26 r#" 26 r#"
27fn zero() {} 27fn zero() {}
28fn f() { zero(1); } 28fn f() { zero(1); }
29 //^^^^^^^ expected 0 arguments, found 1 29 //^^^^^^^ error: expected 0 arguments, found 1
30"#, 30"#,
31 ); 31 );
32 32
@@ -44,7 +44,7 @@ fn f() { zero(); }
44 r#" 44 r#"
45fn one(arg: u8) {} 45fn one(arg: u8) {}
46fn f() { one(); } 46fn f() { one(); }
47 //^^^^^ expected 1 argument, found 0 47 //^^^^^ error: expected 1 argument, found 0
48"#, 48"#,
49 ); 49 );
50 50
@@ -65,7 +65,7 @@ impl S { fn method(&self) {} }
65 65
66fn f() { 66fn f() {
67 S::method(); 67 S::method();
68} //^^^^^^^^^^^ expected 1 argument, found 0 68} //^^^^^^^^^^^ error: expected 1 argument, found 0
69"#, 69"#,
70 ); 70 );
71 71
@@ -91,7 +91,7 @@ impl S { fn method(&self, arg: u8) {} }
91 91
92 fn f() { 92 fn f() {
93 S.method(); 93 S.method();
94 } //^^^^^^^^^^ expected 1 argument, found 0 94 } //^^^^^^^^^^ error: expected 1 argument, found 0
95 "#, 95 "#,
96 ); 96 );
97 97
@@ -131,7 +131,7 @@ fn f() {
131struct Tup(u8, u16); 131struct Tup(u8, u16);
132fn f() { 132fn f() {
133 Tup(0); 133 Tup(0);
134} //^^^^^^ expected 2 arguments, found 1 134} //^^^^^^ error: expected 2 arguments, found 1
135"#, 135"#,
136 ) 136 )
137 } 137 }
@@ -143,7 +143,7 @@ fn f() {
143enum En { Variant(u8, u16), } 143enum En { Variant(u8, u16), }
144fn f() { 144fn f() {
145 En::Variant(0); 145 En::Variant(0);
146} //^^^^^^^^^^^^^^ expected 2 arguments, found 1 146} //^^^^^^^^^^^^^^ error: expected 2 arguments, found 1
147"#, 147"#,
148 ) 148 )
149 } 149 }
@@ -162,9 +162,9 @@ impl Foo {
162 fn new() { 162 fn new() {
163 Foo::Bar(0); 163 Foo::Bar(0);
164 Foo::Bar(0, 1); 164 Foo::Bar(0, 1);
165 //^^^^^^^^^^^^^^ expected 1 argument, found 2 165 //^^^^^^^^^^^^^^ error: expected 1 argument, found 2
166 Foo::Bar(); 166 Foo::Bar();
167 //^^^^^^^^^^ expected 1 argument, found 0 167 //^^^^^^^^^^ error: expected 1 argument, found 0
168 } 168 }
169} 169}
170 "#, 170 "#,
@@ -185,7 +185,7 @@ fn f() {
185 unsafe { 185 unsafe {
186 fixed(0); 186 fixed(0);
187 fixed(0, 1); 187 fixed(0, 1);
188 //^^^^^^^^^^^ expected 1 argument, found 2 188 //^^^^^^^^^^^ error: expected 1 argument, found 2
189 varargs(0); 189 varargs(0);
190 varargs(0, 1); 190 varargs(0, 1);
191 varargs2(); 191 varargs2();
@@ -204,10 +204,10 @@ fn f() {
204fn main() { 204fn main() {
205 let f = |()| (); 205 let f = |()| ();
206 f(); 206 f();
207 //^^^ expected 1 argument, found 0 207 //^^^ error: expected 1 argument, found 0
208 f(()); 208 f(());
209 f((), ()); 209 f((), ());
210 //^^^^^^^^^ expected 1 argument, found 2 210 //^^^^^^^^^ error: expected 1 argument, found 2
211} 211}
212"#, 212"#,
213 ) 213 )