-
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
const fn for option copied, take & replace #86828
const fn for option copied, take & replace #86828
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @joshtriplett (or someone else) soon. Please see the contribution instructions for more information. |
I don't think |
That's where my knowledge kinda falls short. |
Trait bound for const fn is gated under |
#86808 also proposes using that feature in libstd, which is still pending decision by the libs team |
When it comes to the |
7b1bc53
to
b08303e
Compare
a1f5d69
to
fac9281
Compare
2f75b1b
to
42447dd
Compare
Hey! Any updates on this? |
☔ The latest upstream changes (presumably #87768) made this pull request unmergeable. Please resolve the merge conflicts. |
fix: move test that require mut to another Adding TODOs for Option::take and Option::copied TODO to FIXME + moving const stability under normal Moving const stability attr under normal stab attr move more rustc stability attributes
42447dd
to
10ddabc
Compare
triage:
@lambinoo Josh Triplett seems to have a large review backlog. |
Sorry for the delayed review. This seems reasonable to me, particularly since all of these are @bors r+ |
📌 Commit 10ddabc has been approved by |
…-replace, r=joshtriplett const fn for option copied, take & replace Tracking issue: [rust-lang#67441](rust-lang#67441) Adding const fn for the copied, take and replace method of Option. Also adding necessary unit test. It's my first contribution so I am pretty sure I don't know what I'm doing but there's a first for everything!
…arth Rollup of 14 pull requests Successful merges: - rust-lang#86434 (Add `Ipv6Addr::is_benchmarking`) - rust-lang#86828 (const fn for option copied, take & replace) - rust-lang#87679 (BTree: refine some comments) - rust-lang#87910 (Mark unsafe methods NonZero*::unchecked_(add|mul) as const.) - rust-lang#88286 (Remove unnecessary unsafe block in `process_unix`) - rust-lang#88305 (Manual Debug for Unix ExitCode ExitStatus ExitStatusError) - rust-lang#88353 (Partially stabilize `array_methods`) - rust-lang#88370 (Add missing `# Panics` section to `Vec` method) - rust-lang#88481 (Remove some feature gates) - rust-lang#89138 (Fix link in Ipv6Addr::to_ipv4 docs) - rust-lang#89401 (Add truncate note to Vec::resize) - rust-lang#89467 (Fix typos in rustdoc/lints) - rust-lang#89472 (Only register `WSACleanup` if `WSAStartup` is actually ever called) - rust-lang#89505 (Add regression test for spurious const error with NLL) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Tracking issue: #67441
Adding const fn for the copied, take and replace method of Option. Also adding necessary unit test.
It's my first contribution so I am pretty sure I don't know what I'm doing but there's a first for everything!