Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 15.5k
Type inference for todo!() breaks inside a tuple #100727
Copy link
Copy link
Closed
Labels
A-inferenceArea: Type inferenceArea: Type inferenceC-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.
Description
Activity
Metadata
Metadata
Assignees
Labels
A-inferenceArea: Type inferenceArea: Type inferenceC-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.
Type inference for
todo!()works if it is the sole element returned from a map closure, but breaks as soon as it is placed inside a tuple. playground link: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=1cfae6d57f44f603fa2eb258d332c7abI tried this code:
I expected to see this happen: compiles
Instead, this happened: compile error
Meta
I checked "nightly" on the playground and the same compile error happens.