2014-12-02 17:06:39 -06:00
|
|
|
// Test that a partially specified trait object with unspecified associated
|
2015-03-16 11:45:01 -05:00
|
|
|
// type does not type-check.
|
2014-12-02 17:06:39 -06:00
|
|
|
|
|
|
|
trait Foo {
|
|
|
|
type A;
|
2015-02-12 09:29:52 -06:00
|
|
|
|
|
|
|
fn dummy(&self) { }
|
2014-12-02 17:06:39 -06:00
|
|
|
}
|
|
|
|
|
2019-05-28 13:46:13 -05:00
|
|
|
fn bar(x: &dyn Foo) {}
|
2019-12-12 16:48:46 -06:00
|
|
|
//~^ ERROR the associated type `A` (from trait `Foo`) must be specified
|
2014-12-02 17:06:39 -06:00
|
|
|
|
|
|
|
pub fn main() {}
|