rfcs
rfcs copied to clipboard
RFCs for changes to Rust
Continuation of #2309. Fixes: #1880,#1971 This RFC allows us to write the following code: ```Rust #[inherent] impl Bar for Foo { // code } ``` Which allows methods from `Bar`...
Add support for lazy initialized values to standard library, effectively superseding the popular `lazy_static` crate. ```rust use std::sync::Lazy; // `BACKTRACE` implements `Deref` // and is initialized on the first access...
Given that probably the most common model for handling errors in rust programs is just to bubble them up, it is far too common to see errors like this: ```...
Hi, Today i have to do this: ```rust const MVHD: [u8;4] = *b"mvhd"; match header.id { BoxType::Id(BoxId(MVHD)) => self.mvhd = Some(MvhdBox::read(header, reader).await?), // Or BoxType::Id(BoxId([b'm', b'v', b'e', b'x'])) => self.mvex...
This adds `Option::map_or_default` and `Result::map_or_default` which behave exactly like `.map_or_else(Default::default, _)` would, similarly to `.unwrap_or_default()`. [Rendered](https://github.com/orlp/rfcs/blob/option-result-map-or-default/text/3148-option-result-map-or-default.md).
A proposal to add an additional representation to be used with `simd` to allow for scalable vectors to be used. [Rendered](https://github.com/JamieCunliffe/rfcs/blob/repr-scalable/text/3268-repr-scalable.md)
Sometimes we want do divide an integer by another integer and round up the result to next integer. For example we might want to know how many write operations of...
Found using the [`typos-cli` crate](https://crates.io/crates/typos-cli). There are no material changes in this PR.
//Edit after a long time: For everyone, I suggest you read https://github.com/rust-lang/lang-team/issues/49, it summarizes state of things, and explains ideas explored in this RFC and subsequent discussion. This RFC outlines...
I've been working a lot with traits lately with [this rust-geo pull request](https://github.com/georust/rust-geo/pull/85). In that pull request, it splits up concrete geospatial types and geospatial operations. A simplified example: ```rust...