"one type is more general than the other" error that appears to expect and find the same type #90656
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-lifetimes
Area: Lifetimes / regions
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
E-needs-mcve
Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example
Compiling this program:
results in the confusing compiler error:
I expected this program to compile and print
received a 1
to stdout.Doing any of the following will make the program pass compilation (maybe due to how type inference changes?):
.spawn()
to.block_on()
in the main function.boxed()
callMeta
rustc --version --verbose
:This error is also reproducible on the latest stable and latest nightly on the playground.
Playground link: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=cd86e8ecc0289ad192a465214eae3f76
The text was updated successfully, but these errors were encountered: