#[lang = "sized"] trait Sized {} pub trait Foo {} pub trait Bar { type Baz; } struct MyBaz; // { dg-warning "struct is never constructed" } impl Foo for MyBaz {} struct MyBar; impl Bar for MyBar { type Baz = MyBaz; } pub fn foo(_value: T) -> i32 where T: Bar, U: Foo, { 15 } fn main() -> i32 { let bar = MyBar; let result: i32 = foo::(bar); result - 15 }