{ "message": "this function takes 2 parameters but 3 parameters were supplied", "code": { "code": "E0061", "explanation": "\nThe number of arguments passed to a function must match the number of arguments\nspecified in the function signature.\n\nFor example, a function like:\n\n```\nfn f(a: u16, b: &str) {}\n```\n\nMust always be called with exactly two arguments, e.g., `f(2, \"test\")`.\n\nNote that Rust does not have a notion of optional function arguments or\nvariadic functions (except for its C-FFI).\n" }, "level": "error", "spans": [ { "file_name": "compiler/ty/select.rs", "byte_start": 8787, "byte_end": 9241, "line_start": 219, "line_end": 231, "column_start": 5, "column_end": 6, "is_primary": false, "text": [ { "text": " pub fn add_evidence(", "highlight_start": 5, "highlight_end": 25 }, { "text": " &mut self,", "highlight_start": 1, "highlight_end": 19 }, { "text": " target_poly: &ty::Ref,", "highlight_start": 1, "highlight_end": 41 }, { "text": " evidence_poly: &ty::Ref,", "highlight_start": 1, "highlight_end": 43 }, { "text": " ) {", "highlight_start": 1, "highlight_end": 8 }, { "text": " match target_poly {", "highlight_start": 1, "highlight_end": 28 }, { "text": " ty::Ref::Var(tvar, _) => self.add_var_evidence(tvar, evidence_poly),", "highlight_start": 1, "highlight_end": 81 }, { "text": " ty::Ref::Fixed(target_ty) => {", "highlight_start": 1, "highlight_end": 43 }, { "text": " let evidence_ty = evidence_poly.resolve_to_ty();", "highlight_start": 1, "highlight_end": 65 }, { "text": " self.add_evidence_ty(target_ty, evidence_poly, evidence_ty)", "highlight_start": 1, "highlight_end": 76 }, { "text": " }", "highlight_start": 1, "highlight_end": 14 }, { "text": " }", "highlight_start": 1, "highlight_end": 10 }, { "text": " }", "highlight_start": 1, "highlight_end": 6 } ], "label": "defined here", "suggested_replacement": null, "suggestion_applicability": null, "expansion": null }, { "file_name": "compiler/ty/select.rs", "byte_start": 4045, "byte_end": 4057, "line_start": 104, "line_end": 104, "column_start": 18, "column_end": 30, "is_primary": true, "text": [ { "text": " self.add_evidence(target_fixed, evidence_fixed, false);", "highlight_start": 18, "highlight_end": 30 } ], "label": "expected 2 parameters", "suggested_replacement": null, "suggestion_applicability": null, "expansion": null } ], "children": [], "rendered": "error[E0061]: this function takes 2 parameters but 3 parameters were supplied\n --> compiler/ty/select.rs:104:18\n |\n104 | self.add_evidence(target_fixed, evidence_fixed, false);\n | ^^^^^^^^^^^^ expected 2 parameters\n...\n219 | / pub fn add_evidence(\n220 | | &mut self,\n221 | | target_poly: &ty::Ref,\n222 | | evidence_poly: &ty::Ref,\n... |\n230 | | }\n231 | | }\n | |_____- defined here\n\n" }