mirror of
https://github.com/rust-lang/rust
synced 2024-09-05 16:57:03 +00:00
14 lines
281 B
Rust
14 lines
281 B
Rust
// Test equality constraints on associated types. Check that unsupported syntax
|
|
// does not ICE.
|
|
|
|
pub trait Foo {
|
|
type A;
|
|
fn boo(&self) -> <Self as Foo>::A;
|
|
}
|
|
|
|
fn foo2<I: Foo>(x: I) {
|
|
let _: A = x.boo(); //~ ERROR cannot find type `A` in this scope
|
|
}
|
|
|
|
pub fn main() {}
|