Skip to content

Forbid recursive impl trait#56074

Merged
bors merged 2 commits intorust-lang:masterfrom
matthewjasper:forbid-recursive-impl-trait
Jan 4, 2019
Merged

Forbid recursive impl trait#56074
bors merged 2 commits intorust-lang:masterfrom
matthewjasper:forbid-recursive-impl-trait

Conversation

@matthewjasper
Copy link
Contributor

@matthewjasper matthewjasper commented Nov 19, 2018

There is no type T, such that T = [T; 2], but impl Trait could sometimes
be to circumvented this.

This patch makes it a hard error for an opaque type to resolve to such a
"type". Before this can be merged it needs

  • A better error message - it's good enough for now.
  • A crater run (?) to see if this any real-world code

closes #47659

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

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-lang Relevant to the language team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve error message for infinitely recursive impl Trait type