rust/tests/ui/structs-enums/classes-cross-crate.rs
2024-02-16 20:02:50 +00:00

14 lines
296 B
Rust

//@ run-pass
//@ aux-build:cci_class_4.rs
extern crate cci_class_4;
use cci_class_4::kitties::cat;
pub fn main() {
let mut nyan = cat(0_usize, 2, "nyan".to_string());
nyan.eat();
assert!((!nyan.eat()));
for _ in 1_usize..10_usize { nyan.speak(); };
assert!((nyan.eat()));
}