mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 09:44:08 +00:00
20 lines
229 B
Rust
20 lines
229 B
Rust
//@ check-pass
|
|
#![allow(dead_code)]
|
|
trait T {
|
|
type X;
|
|
const X: Self::X;
|
|
}
|
|
fn foo<X: T>() {
|
|
let _: X::X = X::X;
|
|
}
|
|
|
|
trait S {
|
|
const X: Self::X;
|
|
type X;
|
|
}
|
|
fn bar<X: S>() {
|
|
let _: X::X = X::X;
|
|
}
|
|
|
|
fn main() {}
|