Closed
Description
fn bar() -> Vec<impl Copy> {
panic!()
}
Currently gives the following error:
error[E0283]: type annotations required: cannot resolve `_: std::marker::Copy`
--> src/lib.rs:1:17
|
1 | fn bar() -> Vec<impl Copy> {
| ^^^^^^^^^
|
= note: the return type of a function must have a statically known size
This message has a weird span, and doesn't give any clue that the problem lies with the call to panic!
Metadata
Metadata
Assignees
Labels
Area: Messages for errors, warnings, and lintsArea: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.Category: An issue proposing an enhancement or a PR with one.Diagnostics: Confusing error or lint that should be reworked.Relevant to the compiler team, which will review and decide on the PR/issue.