mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
13 lines
183 B
Rust
13 lines
183 B
Rust
// run-pass
|
|
trait Tr { type T; }
|
|
impl Tr for u8 { type T=(); }
|
|
struct S<I: Tr>(#[allow(dead_code)] I::T);
|
|
|
|
fn foo<I: Tr>(i: I::T) {
|
|
S::<I>(i);
|
|
}
|
|
|
|
fn main() {
|
|
foo::<u8>(());
|
|
}
|