-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Make tcx.mk_const
more permissive wrt kind
argument (impl Into
)
#105012
Conversation
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #105008) made this pull request unmergeable. Please resolve the merge conflicts. |
- Accept `impl Into` - Implement `From<>` for `ConstKind` Note: this adds a dependency on `derive_more` (MIT license). It allows to derive a lot of traits (like `From` here) that would be otherwise tedious to implement.
... `tcx.mk_const` can now be used instead
`mk_const(ty::ConstKind::X(...), ty)` can now be simplified to `mk_cosnt(..., ty)`. I searched with the following regex: \mk_const\([\n\s]*(ty::)?ConstKind\ I've left `ty::ConstKind::{Bound, Error}` as-is, they seem clearer this way.
...it's just `mk_const` but without the sparcles
e74fdb4
to
b44817f
Compare
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit b44817f with merge 82877d5eeacaaf632388af232976d23d529ca7c2... |
@bors delegate+ r=me with perf clean and the review comment addressed |
✌️ @WaffleLapkin can now approve this pull request |
@bors p=1 bitrotty |
@rust-timer build 82877d5eeacaaf632388af232976d23d529ca7c2 |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (82877d5eeacaaf632388af232976d23d529ca7c2): comparison URL. Overall result: ❌ regressions - no action neededBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
|
?? Also, the regression itself looks super weird... |
Looks like something in inference var resolving regressed. |
@bors r+ looking at the graph of the wg-grammar benchmark this seems to be within the regular ups and downs of that benchmark |
☀️ Test successful - checks-actions |
Finished benchmarking commit (e0098a5): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
|
Make `tcx.mk_const` more permissive wrt `kind` argument (`impl Into`) r? `@oli-obk` you've asked for this >:)
r? @oli-obk you've asked for this >:)