summary refs log tree commit diff
path: root/src/test/compile-fail/iface-test.rs
blob: 86c5a478d81e5c2155ef655845ea836980d9dbd8 (plain)
1
2
3
4
5
6
7
8
9
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() {}