-
-
Notifications
You must be signed in to change notification settings - Fork 17.2k
preserve name of type parameter when printing #2951
Copy link
Copy link
Closed
Labels
A-prettyArea: Pretty printing (including `-Z unpretty`)Area: Pretty printing (including `-Z unpretty`)E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Description
Activity
Metadata
Metadata
Assignees
Labels
A-prettyArea: Pretty printing (including `-Z unpretty`)Area: Pretty printing (including `-Z unpretty`)E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Right now type parameters are printed as
'aor'bwhereaandbare derived from the index of the type parameter in the list of type parameters. The user gave them names, we should print them! Part of the problem is that they may not be readily available; in thety_paramvariant we have the index and the def-id. I guess the latter ought to be enough to recover the name the user gave.The relevant code is in
rustc::util::ppaux