Closed
Description
Code:
fn bar(foo: &Foo) {}
fn baz(foo: &Foo) {
// this call works
bar(foo);
}
trait Foo {
fn qux(&self) {
// this doesn't, and error is
// error: the trait `core::kinds::Sized` is not implemented for the type `Self`
bar(self);
}
}
Calls to bar
seems to be identical from baz
and qux
functions, however, first call works and second doesn't. I don't understand how sized/unsized types work, please, close if it is not a bug.