rust/src/test/compile-fail/iface-test.rs
2012-02-10 13:31:33 +01:00

10 lines
244 B
Rust

iface foo { fn foo(); }
impl of foo for uint {} //! ERROR missing method `foo`
impl of foo for uint { fn foo() -> int {} } //! ERROR incompatible type
impl of int for uint { fn foo() {} } //! ERROR can only implement interface
fn main() {}