-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Add const_closure, Constify Try trait #102186
Conversation
r? @thomcc (rust-highfive has picked a reviewer for you, use r? to override) |
ec10b2d
to
f7c87a7
Compare
f7c87a7
to
53049f7
Compare
r? @fee1-dead |
cc @rust-lang/wg-const-eval |
Internal features are usually added along with the main features that they help implement, so no. |
@bors r+ |
📋 Looks like this PR is still in progress, ignoring approval. Hint: Remove [WIP] from this PR's title when it is ready for review. |
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
@bors r+ |
…=fee1-dead Add const_closure, Constify Try trait Adds a struct for creating const `FnMut` closures (for now just copy pasted form my [const_closure](https://crates.io/crates/const_closure) crate). I'm not sure if this way is how it should be done. The `ConstFnClosure` and `ConstFnOnceClosure` structs can probably also be entirely removed. This is then used to constify the try trait. Not sure if i should add const_closure in its own pr and maybe make it public behind a perma-unstable feature gate. cc `@fee1-dead` `@rust-lang/wg-const-eval`
…=fee1-dead Add const_closure, Constify Try trait Adds a struct for creating const `FnMut` closures (for now just copy pasted form my [const_closure](https://crates.io/crates/const_closure) crate). I'm not sure if this way is how it should be done. The `ConstFnClosure` and `ConstFnOnceClosure` structs can probably also be entirely removed. This is then used to constify the try trait. Not sure if i should add const_closure in its own pr and maybe make it public behind a perma-unstable feature gate. cc ``@fee1-dead`` ``@rust-lang/wg-const-eval``
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#100823 (Refactor some `std` code that works with pointer offstes) - rust-lang#102088 (Fix wrongly refactored Lift impl) - rust-lang#102109 (resolve: Set effective visibilities for imports more precisely) - rust-lang#102186 (Add const_closure, Constify Try trait) - rust-lang#102203 (rustdoc: remove no-op CSS `#source-sidebar { z-index }`) - rust-lang#102204 (Make `ManuallyDrop` satisfy `~const Destruct`) - rust-lang#102210 (diagnostics: avoid syntactically invalid suggestion in if conditionals) - rust-lang#102226 (bootstrap/miri: switch to non-deprecated env var for setting the sysroot folder) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
@rustbot label +const-hack |
Adds a struct for creating const
FnMut
closures (for now just copy pasted form my const_closure crate).I'm not sure if this way is how it should be done.
The
ConstFnClosure
andConstFnOnceClosure
structs can probably also be entirely removed.This is then used to constify the try trait.
Not sure if i should add const_closure in its own pr and maybe make it public behind a perma-unstable feature gate.
cc @fee1-dead @rust-lang/wg-const-eval