Closed as not planned
Description
Given the following code: Playground
pub trait AutoSplitter {
type Data;
fn update(&mut self) -> Option<Self::Data>;
fn should_start(data: &Self::Data) -> bool {
false
}
}
The current output is:
warning: unused variable: `data`
--> src/lib.rs:4:21
|
4 | fn should_start(data: &Self::Data) -> bool {
| ^^^^ help: if this is intentional, prefix it with an underscore: `_data`
|
= note: `#[warn(unused_variables)]` on by default
Ideally the compiler should not emit any warnings as prefixing the parameter with an underscore would negatively affect the documentation and auto generated implementations via an IDE / rust-analyzer.