rust/src/test/ui/error-codes/E0283.rs
2018-12-25 21:08:33 -07:00

19 lines
274 B
Rust

trait Generator {
fn create() -> u32;
}
struct Impl;
impl Generator for Impl {
fn create() -> u32 { 1 }
}
struct AnotherImpl;
impl Generator for AnotherImpl {
fn create() -> u32 { 2 }
}
fn main() {
let cont: u32 = Generator::create(); //~ ERROR E0283
}