-
Notifications
You must be signed in to change notification settings - Fork 13.3k
skip trivial Sized
predicates
#53248
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
skip trivial Sized
predicates
#53248
Conversation
/// | ||
/// Returning true means the type is known to be sized. Returning | ||
/// `false` means nothing -- could be sized, might not be. | ||
pub fn is_trivially_sized(&self, tcx: TyCtxt<'_, '_, 'tcx>) -> bool { |
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.
Huh, didn't we use to have something like this?
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.
I thought so too but I didn't find it...
@bors r+ |
📌 Commit 1341e66 has been approved by |
⌛ Testing commit 1341e66 with merge 4b5307745b567835dbe3cbcaebba87a8a4b89d4c... |
skip trivial `Sized` predicates This came to about a 2% win for me in cargo. Small, but hey. r? @eddyb
☀️ Test successful - status-appveyor, status-travis |
We got some nice improvements from this PR and/or #53258 and/or #53316, on both NLL and non-NLL benchmarks: |
This came to about a 2% win for me in cargo. Small, but hey.
r? @eddyb