// Copyright 2016 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 or the MIT license // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. 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 }