mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 14:01:51 +00:00
19 lines
329 B
Rust
19 lines
329 B
Rust
trait Proj {
|
|
type Assoc;
|
|
}
|
|
impl<T> Proj for T {
|
|
type Assoc = T;
|
|
}
|
|
|
|
struct Fail<T: Proj<Assoc = U>, U>(T);
|
|
|
|
impl Fail<i32, i32> {
|
|
const C: () = ();
|
|
}
|
|
|
|
fn main() {
|
|
Fail::<i32, u32>::C
|
|
//~^ ERROR: type mismatch
|
|
//~| ERROR no associated item named `C` found for struct `Fail<i32, u32>` in the current scope
|
|
}
|