Compiler incorrectly reports function return type declaration as source of inner type mismatch with conservative_impl_trait #46644
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-impl-trait
Area: impl Trait. Universally / existentially quantified anonymous types with static dispatch.
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Given a function specified as returning a composite type that incorrectly returns an object with an inner type mismatch, the compiler reports the error as being in the function return type declaration rather than at the point the incorrect item is returned.
A sample git repo can be found here: https://git.neosmart.net/mqudsi/futuretest/src/rust-46644
The code in question:
The compiler returns the following;
The text was updated successfully, but these errors were encountered: