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