summary refs log tree commit diff
path: root/src/test/ui/error-codes/E0283.rs
blob: 9bdcc9ac42a7a2dd4211cca3ae2bda77437f0393 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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
}