mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
12 lines
200 B
Rust
12 lines
200 B
Rust
// run-pass
|
|
trait Tr { type T; }
|
|
impl Tr for u8 { type T=(); }
|
|
struct S<I: Tr>(#[allow(unused_tuple_struct_fields)] I::T);
|
|
|
|
fn foo<I: Tr>(i: I::T) {
|
|
S::<I>(i);
|
|
}
|
|
|
|
fn main() {
|
|
foo::<u8>(());
|
|
}
|