rust/src/test/ui/assoc-inherent.rs
2021-02-25 14:10:25 +01:00

21 lines
377 B
Rust

// Test that inherent associated types work with
// inherent_associated_types feature gate.
#![feature(inherent_associated_types)]
#![allow(incomplete_features)]
struct Foo;
impl Foo {
type Bar = isize;
}
impl Foo {
type Baz; //~ ERROR associated type in `impl` without body
}
fn main() {
let x : Foo::Bar; //~ERROR ambiguous associated type
x = 0isize;
}