Skip to content

extend TypeName with slice type #440

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nikomatsakis opened this issue May 5, 2020 · 1 comment · Fixed by #443
Closed

extend TypeName with slice type #440

nikomatsakis opened this issue May 5, 2020 · 1 comment · Fixed by #443
Assignees

Comments

@nikomatsakis
Copy link
Contributor

nikomatsakis commented May 5, 2020

As part of #368, we need to extend chalk's TypeName to model the built-in [T] type. We can add a variant Slice.

You can follow #394 which provides a rough model of what needs to be extended. You probably want to model this on how tuples are handled, a N-ary tuple like (_, _) has two generic type parameters, and slices have one generic type parameter.

You would need to

  • add Slice to TypeName
  • extend parser to accept [T] type
  • Update the current state table to include [T], though slices don't I think require any special handling (they are not Sized, and their other impls live in the standard library).

This issue has been assigned to @nathanwhit via this comment.

@nathanwhit
Copy link
Member

@rustbot claim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants