Closed
Description
openedon Sep 25, 2015
fn foo(arg: Foo) {} //Foo is a trait
fn bar (arg: [i32]) {}
fn quz (arg: str) {}
All those functions return the following error: the trait core::marker::Sized
is not implemented for the type...
This is confusing for a beginner, because it makes you think you need to implement a trait to make it work. The message could suggest using &Foo/&[i32]/&str
instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsCategory: An issue proposing an enhancement or a PR with one.Diagnostics: Confusing error or lint; hard to understand for new users.Diagnostics: An error or lint that needs small tweaks.Relevant to the compiler team, which will review and decide on the PR/issue.