Skip to content

Trait inference is broken for unnamed structs #130318

Open
@gerben-stavenga

Description

I tried this code:

https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=f985f43df2ad05edfb593d23248e46f3

I expected to see this happen: That this works both for structs with named fields as with structs with anonymous fields

Instead, this happened: Works as expected for named fields, but fails to compile for anonymous structs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

A-associated-itemsArea: Associated items (types, constants & functions)A-trait-systemArea: Trait systemC-bugCategory: This is a bug.E-help-wantedCall for participation: Help is requested to fix this issue.S-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions