Conversation
Collaborator
|
r? @chenyukang rustbot has assigned @chenyukang. Use Why was this reviewer chosen?The reviewer was selected based on:
|
Member
|
@rustbot reroll |
Contributor
Author
|
(#163098 means i need to modify the tests again before this gets merged) |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See: llvm/llvm-project#196812
TL;DR sidesteps a name collision issue that affects generics, e.g.
S<u64>andS<usize>resolving as the same type.This is accomplished by wrapping an existing primitive node in a
usize/isizetypedef instead.I'd love to output typedefs for all the primitive types too, so LLDB displays the type names rust-style, but I've got a couple worries with that. Firstly, GDB doesn't seem to like it w.r.t. enums? IIRC it's because of a small difference in how GDB treats typedefs compared to LLDB. I'm like 80% sure it's hard-coded in GDB itself, so it's not something I want to touch atm.
Secondly, I'm not entirely sure it's a good idea to have both a type and a typedef with the exact same name in the first place. I could easily imagine that causing some similar issues to the one we're trying to solve.
This also includes a small extention to the
Rctest to ensure we can read bothRc<u64>andRc<usize>. Without this change, the secondvcommand would fail to materialize any value: