rfcs
rfcs copied to clipboard
RFCs for changes to Rust
If I have a struct like this: ```rs struct T1 {} struct T2 {} pub struct Aggregate { v1: Vec, v2: Vec, } impl Aggregate { pub fn compute(&self, range:...
# Summary I'm proposing a small quality of life improvement, that I was surprised to find wasn't already a part of the language. I want to introduce a new `FromIterator`...
I propose the following requirement for a target to be Tier 1 or Tier 2: For a target P using architecture A (`target_arch`) to be Tier 2, there must exist...
I propose to add closure-level inline constants. For example the following code ``` let closeure_uuid = Uuid::new_v4(); let lambda = || { println!("Execution UUID {}",Uuid::new_v4()); println!("Closure UUID {}",closeure_uuid); }; lambda...
As discussed [on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/--print.20std-support), this RFC proposes adding a new argument for `rustc --print` that acts as the single source of truth for whether a target supports std. [Rendered](https://github.com/adamgemmell/rfcs/blob/dev/adagem01/std-supported/text/3693-print-std-support.md)
/cc @rust-lang/crates-io A big thank you to @woodruffw for co-authoring, providing prior art through PyPi's implementation, and all of the expert advice. 🙏 [Rendered](https://github.com/mdtro/rfcs/blob/mdtro/trusted-publishing-cratesio/text/3691-trusted-publishing-cratesio.md)
There is a desire to have some sort of shorthand for functions that immediately match on their argument. Currently, one must write: ``` rust fn foo(x: Type) { match x...
The current closure style is great. It's simple and to the point and leaves little to be desired. However, I often find myself writing code like this: ```rust some_operation().and_then(|x| x.get(1));...
About as simple as it gets. [Rendered](https://github.com/jhpratt/rfcs/blob/cfg-logical-ops/text/0000-cfg-logical-ops.md)
tldr: make it easier/safer to use `target_feature` in traits. Also see prior discussion in https://github.com/rust-lang/rust/issues/139368. [Rendered](https://github.com/veluca93/rfcs/blob/tft/text/3820-target-feature-traits.md)