mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
14 lines
271 B
Rust
14 lines
271 B
Rust
// Test that a partially specified trait object with unspecified associated
|
|
// type does not type-check.
|
|
|
|
trait Foo {
|
|
type A;
|
|
|
|
fn dummy(&self) { }
|
|
}
|
|
|
|
fn bar(x: &dyn Foo) {}
|
|
//~^ ERROR the associated type `A` (from trait `Foo`) must be specified
|
|
|
|
pub fn main() {}
|