rfcs
rfcs copied to clipboard
RFCs for changes to Rust
Something I've seen elsewhere is the concept of piping data to functions, which can drastically increase readability in cases where someone would either use intermediate variables or call functions as...
Support the following: ```rust #[derive(Default)] enum Foo { #[default] Bar { x: Option, y: Option, }, Baz, } ``` [Rendered](https://github.com/estebank/rfcs/blob/derive-default-enum-with-fields/text/0000-derive-default-enum-with-fields.md)
Provide a feature to simplify performing lightweight clones (such as of `Arc`/`Rc`), particularly cloning them into closures or async blocks, while still keeping such cloning visible and explicit. A very...
Allow `struct` definitions to provide default values for individual fields and thereby allowing those to be omitted from initializers. When deriving `Default`, the provided values will then be used. For...
[Rendered](https://github.com/Turbo87/rust-rfcs/blob/crates-io-remove-dev-deps/text/3674-crates-io-remove-dev-deps.md)
Support restricting implementation of individual methods within traits, using the already reserved `final` keyword. This makes it possible to define a trait that any crate can implement, but disallow overriding...
Short Description: Add the ability to use the underscore character (_) (or similar) to indicate the return type in function signatures in Rust. This would allow the compiler to automatically...
# Proposal Allow the use of `self` as an identifier in identifier patterns (`foo @ Foo { bar, baz }`). # Motivation As seen in the following search results within...
I found this [cool crate](https://crates.io/crates/dbg-pls) that offers a colored version of [dbg!()](https://doc.rust-lang.org/std/macro.dbg.html) called [color!()](https://docs.rs/dbg-pls/0.4.3/dbg_pls/macro.color.html). Unfortunately, it doesn't integrate with all other crates because most people aren't aware of this crate...
I read in this [blog post](https://www.ncameron.org/blog/the-problem-with-rfcs/) and in [this](https://www.reddit.com/r/rust/comments/sy65f7/we_need_to_talk_about_rfcs/) thread that the Rust community is frustrated with GitHub's UI for discussing RFCs. I want to share a new kind of...