-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Confusing error when using unsized types without indirection #28653
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
D-newcomer-roadblock
Diagnostics: Confusing error or lint; hard to understand for new users.
D-papercut
Diagnostics: An error or lint that needs small tweaks.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
Should we add an |
Triage: no change. Here's the actual diagnostic today
|
steveklabnik
added
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
and removed
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
Mar 8, 2017
Mark-Simulacrum
added
the
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
label
Jul 24, 2017
Same message on rustc 1.23.0-nightly (8b22e70 2017-10-31) |
CC #23286 |
|
estebank
added
D-newcomer-roadblock
Diagnostics: Confusing error or lint; hard to understand for new users.
D-papercut
Diagnostics: An error or lint that needs small tweaks.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
Jan 22, 2020
Manishearth
added a commit
to Manishearth/rust
that referenced
this issue
Jul 13, 2020
Provide structured suggestion on unsized fields and fn params * Suggest borrowing or boxing unsized fields * Suggest borrowing fn parameters * Remove some verbosity of unsized errors * Remove `on_unimplemented` note from `trait Sized` Fix rust-lang#23286, fix rust-lang#28653. r? @davidtwco
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
D-newcomer-roadblock
Diagnostics: Confusing error or lint; hard to understand for new users.
D-papercut
Diagnostics: An error or lint that needs small tweaks.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
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.The text was updated successfully, but these errors were encountered: