rust/tests/ui/structs-enums/auxiliary/cci_class_2.rs
2023-01-11 09:32:08 +00:00

20 lines
290 B
Rust

pub mod kitties {
pub struct cat {
meows : usize,
pub how_hungry : isize,
}
impl cat {
pub fn speak(&self) {}
}
pub fn cat(in_x : usize, in_y : isize) -> cat {
cat {
meows: in_x,
how_hungry: in_y
}
}
}