rust/tests/ui/structs-enums/classes-cross-crate.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
294 B
Rust
Raw Normal View History

// 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();
2013-03-29 01:39:09 +00:00
assert!((!nyan.eat()));
for _ in 1_usize..10_usize { nyan.speak(); };
2013-03-29 01:39:09 +00:00
assert!((nyan.eat()));
}