Skip to content
This repository was archived by the owner on Apr 15, 2022. It is now read-only.

Improve type name handling #15

Merged
merged 1 commit into from
May 15, 2020
Merged

Improve type name handling #15

merged 1 commit into from
May 15, 2020

Conversation

randomPoison
Copy link
Owner

This PR makes two changes to make TypeName more useful:

  • Add a type_name associated function to the Describe trait to directly get the type name for any type implementing Describe. As as result, all primitive types now have an associated type name.
  • Add a type_params field to TypeName to ensure that different monomorphizations of a generic type can be differentiated by their type name (as described in TypeName doesn't account for generics #12).

Together these changes make it easier to use TypeName to uniformly reference a type without needing to fully describe a type.

Closes #12

@randomPoison randomPoison merged commit ef03b33 into master May 15, 2020
@randomPoison randomPoison deleted the type-name-improvements branch May 15, 2020 21:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeName doesn't account for generics
1 participant