-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Use more precise span when checking type definitions #26221
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
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
scope: ast::NodeId, | ||
cache: Option<&'cx mut HashSet<Ty<'tcx>>>) | ||
-> BoundsChecker<'cx,'tcx> { | ||
BoundsChecker { fcx: fcx, span: span, scope: scope, | ||
BoundsChecker { fcx: fcx, span: DUMMY_SP, scope: scope, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this span
field is never used, can it be deleted? If it is used, it seems odd to use DUMMY_SP
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After the patch, it is used, but not initialized here.
r? @nikomatsakis or @pnkfelix |
@bors r+ |
📌 Commit 412977d has been approved by |
☔ The latest upstream changes (presumably #26190) made this pull request unmergeable. Please resolve the merge conflicts. |
Needs a rebase. |
Actually, thinking about it, I would also want tests that this feature works on both structs and enums, both tuple-like and dictionary-like. |
🔒 Merge conflict |
Rebased and added tests. |
When checking field types of struct or enum definitions, use spans for field types instead of the entire item.
When checking field types of struct or enum definitions, use spans for field types instead of the entire item.