-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Use ptr::metadata in <[T]>::len implementation #100848
Use ptr::metadata in <[T]>::len implementation #100848
Conversation
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
r? @m-ou-se (rust-highfive has picked a reviewer for you, use r? to override) |
This avoids duplication of ptr::metadata code.
6d5e21c
to
155b4c2
Compare
This is a nice cleanup. I suppose it could impact compile-perf ( @bors r+ rollup=iffy |
☀️ Test successful - checks-actions |
1 similar comment
☀️ Test successful - checks-actions |
Finished benchmarking commit (56f1325): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression 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.
CyclesThis benchmark run did not return any relevant results for this metric. Footnotes |
This avoids duplication of ptr::metadata code.
I believe this is acceptable as the previous approach essentially duplicated
ptr::metadata
because back thenrustc_allow_const_fn_unstable
annotation did not exist.I would like somebody to ping @rust-lang/wg-const-eval as the documentation says: