rust/tests/ui/issues/issue-19482.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
271 B
Rust
Raw Normal View History

// Test that a partially specified trait object with unspecified associated
// type does not type-check.
trait Foo {
type A;
fn dummy(&self) { }
}
2019-05-28 18:46:13 +00:00
fn bar(x: &dyn Foo) {}
//~^ ERROR the associated type `A` (from trait `Foo`) must be specified
pub fn main() {}