// Check that we correctly prevent users from making trait objects // form traits that make use of `Self` in an argument or return position. trait Bar { fn bar(&self, x: &T); } trait Baz : Bar { //~^ ERROR the size for values of type `Self` cannot be known } fn make_bar>(t: &T) -> &dyn Bar { t } fn make_baz(t: &T) -> &dyn Baz { //~^ ERROR E0038 t } fn main() { }