{ "message": "this argument is passed by reference, but would be more efficient if passed by value", "code": { "code": "clippy::trivially_copy_pass_by_ref", "explanation": null }, "level": "warning", "spans": [ { "file_name": "compiler/mir/tagset.rs", "byte_start": 941, "byte_end": 946, "line_start": 42, "line_end": 42, "column_start": 24, "column_end": 29, "is_primary": true, "text": [ { "text": " pub fn is_disjoint(&self, other: Self) -> bool {", "highlight_start": 24, "highlight_end": 29 } ], "label": null, "suggested_replacement": null, "suggestion_applicability": null, "expansion": null } ], "children": [ { "message": "lint level defined here", "code": null, "level": "note", "spans": [ { "file_name": "compiler/lib.rs", "byte_start": 8, "byte_end": 19, "line_start": 1, "line_end": 1, "column_start": 9, "column_end": 20, "is_primary": true, "text": [ { "text": "#![warn(clippy::all)]", "highlight_start": 9, "highlight_end": 20 } ], "label": null, "suggested_replacement": null, "suggestion_applicability": null, "expansion": null } ], "children": [], "rendered": null }, { "message": "#[warn(clippy::trivially_copy_pass_by_ref)] implied by #[warn(clippy::all)]", "code": null, "level": "note", "spans": [], "children": [], "rendered": null }, { "message": "for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref", "code": null, "level": "help", "spans": [], "children": [], "rendered": null }, { "message": "consider passing by value instead", "code": null, "level": "help", "spans": [ { "file_name": "compiler/mir/tagset.rs", "byte_start": 941, "byte_end": 946, "line_start": 42, "line_end": 42, "column_start": 24, "column_end": 29, "is_primary": true, "text": [ { "text": " pub fn is_disjoint(&self, other: Self) -> bool {", "highlight_start": 24, "highlight_end": 29 } ], "label": null, "suggested_replacement": "self", "suggestion_applicability": "Unspecified", "expansion": null } ], "children": [], "rendered": null } ], "rendered": "warning: this argument is passed by reference, but would be more efficient if passed by value\n --> compiler/mir/tagset.rs:42:24\n |\n42 | pub fn is_disjoint(&self, other: Self) -> bool {\n | ^^^^^ help: consider passing by value instead: `self`\n |\nnote: lint level defined here\n --> compiler/lib.rs:1:9\n |\n1 | #![warn(clippy::all)]\n | ^^^^^^^^^^^\n = note: #[warn(clippy::trivially_copy_pass_by_ref)] implied by #[warn(clippy::all)]\n = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref\n\n" }