mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-19 09:33:36 +00:00
27 lines
372 B
Rust
27 lines
372 B
Rust
|
#![allow(clippy::unit_arg)]
|
||
|
|
||
|
struct One {
|
||
|
x: i32,
|
||
|
}
|
||
|
struct Two {
|
||
|
x: i32,
|
||
|
}
|
||
|
|
||
|
struct Product {}
|
||
|
|
||
|
impl Product {
|
||
|
pub fn a_method(self, _: ()) {}
|
||
|
}
|
||
|
|
||
|
fn from_array(_: [i32; 2]) -> Product {
|
||
|
todo!()
|
||
|
}
|
||
|
|
||
|
pub fn main() {
|
||
|
let one = One { x: 1 };
|
||
|
let two = Two { x: 2 };
|
||
|
|
||
|
let product = from_array([one.x, two.x]);
|
||
|
product.a_method(<()>::default());
|
||
|
}
|