rust-lang.github.io
...one of the goals of charter work is to ensure that our governance structure matches reality, so it is better to not be responsible for things that you do not think you can do well. Charters are living documents, and growing scope over time is reasonable: starting out with a...
RFC 3037
RFC
2020-12-03
~11 min read
rust-lang.github.io
...The type for the right-hand side (Rhs) along with the type of their sum (Sum) are defined as trait parameters, which are always outputs of the trait matching: that is, they are specified by the impl and are not used to select which impl is used.
This setup means...
RFC 135
RFC
2014-09-30
~12 min read
github.com
...Fallibility=Infallible> { ... }
impl<T, ..., F> Vec<T, ..., F> {
fn push(&mut self) -> F::Result<(), T> {
if self.len() == self.capacity() {
let result = self.reserve(1);
// ??? How do I match on this in generic code ???
// (can't use Carrier since we need to add `elem` payload?)
if result.is_err() {
// Have...
RFC 2116
RFC
2017-08-18
~24 min read
rust-lang.github.io
...It’s important for effort to match the actual stage in the life cycle, ideally to push it to the next. For example, I consider the language to mostly be in the “polish” stage. Continuing to treat it as research would bring dependent types, virtual structs, etc., which would be...
RFC 2657
RFC
2019-03-30
~12 min read
rust-lang.github.io
...I would argue that we should change wg-llvm to match these definitions. --nikomatsakis
Wait, it has TWO parent teams?? Can you do that???
Why the heck not! The team really has two aspects to its character, and so it likely belongs in both. This is further supported that the...
RFC 3254
RFC
2022-04-12
~12 min read
rust-lang.github.io
...the order of the types is significant, so From allows extensibility in some cases that Into does not.
•
To match with existing conventions around conversions and constructors (in particular, replacing many from constructors).
Blanket impls
Given the above trait design, there are a few straightforward blanket impls as one would...
RFC 529
RFC
2014-11-21
~12 min read
rust-lang.github.io
...Specifically, the #[link] attribute will be extended with a new argument that it accepts, cfg(..), such as:
#[link(name = "foo", cfg(bar))]
This cfg indicates to the compiler that the #[link] annotation only applies if the bar directive is matched. This interpretation is done not during compilation of the crate...
RFC 1721
RFC
2016-08-18
~12 min read
rust-lang.github.io
...To my knowledge, this already mostly matches the current implementation. The only exception is that "fragment becomes initialized when all its nested fragments become initialized" rule is not currently implemented for neither structs nor unions, so the compiler accepts less code than it should. However, impl Drop for Union and...
RFC 2514
RFC
2018-08-03
~13 min read
rust-lang.github.io
...It is important that the formatting done locally by a developer matches the formatting checked on the CI - if the version of Rustfmt changes and formatting changes too, then the developer could have run Rustfmt but still fail CI. Finally, a big motivator for an automated formatting tool like Rustfmt...
RFC 2437
RFC
2018-05-10
~13 min read
rust-lang.github.io
...Mirrors will still be required to serve exactly the same files (matched checksums) as the source they're mirroring.
Reference-level explanation
Registry index format specification
Cargo needs to be able to get a registry index containing metadata for all crates and their dependencies available from an alternate registry in...
RFC 2141
RFC
2017-09-06
~12 min read
rust-lang.github.io
...Unresolved questions
Avoiding Hyrum's Law
There are a lot of \commands in math-core, and some of them are known buggy, meaning they don't match LaTeX itself. We don't want authors to rely on those bugs, either accidentally or in a workaround.
Normally, we might "phase in...
RFC 3958
RFC
2026-04-30
~12 min read
rust-lang.github.io
...this year.
• January
• Rust 2019 survey results published
• Roadmap RFC opened
• February
• March
• Publish progress report, with emphasis on linking/identifying team plans for matching up to roadmap goals
• April
• May
• June
• Publish progress report, describing what work we have done so far towards the goals of this roadmap
• Identify...
RFC 2857
RFC
2020-02-19
~13 min read
rust-lang.github.io
...usize) -> Foo {
match which {
0 => FOO,
1 => foo1(),
2 => foo2(),
3 => opt_foo().unwrap(),
// It also allows us to make recursive calls to functions with an
// `impl Trait` return type:
x => one_of_the_foos(x - 4),
}
}
Separately, this RFC adds the ability to store an impl Trait type in...
RFC 2071
RFC
2017-07-20
~14 min read
rust-lang.github.io
...This corresponds to replacing the LLVM dereferenceable attribute by a (planned by not yet implemented) dereferenceable-on-entry, which matches the semantics of references in C++. But that does not solve the problem of the MaybeUninit<Box<_>> footgun, i.e., the first example. (We would have to change the rules...
RFC 3336
RFC
2024-05-09
~14 min read
rust-lang.github.io
...public" diagnostics can be turned into lints instead of being completely removed.Lints, unlike errors, can use heuristics, so "private-in-public" diagnostics can match programmer's intuition closer now by using reachability-based heuristics instead of just local pub annotations.
Guide-level explanation
Type privacy
Type privacy ensures that...
RFC 2145
RFC
2017-09-09
~14 min read
rust-lang.github.io
...artifact, or the crate name if not specified; for instance, it may be in lowercase, or contain dashes.
• For convenience, if the artifact name matches the original package name, cargo additionally supplies a copy of this variable with the _<NAME> suffix omitted. For instance, if the cmake crate supplies a...
RFC 3028
RFC
2020-11-30
~15 min read
rust-lang.github.io
...Users would depend on clap_distribution through a never-matching target-dependency so it doesn't affect builds. It exists so users would version.from = ["clap_distribution"] it, keeping the set in sync. This only helps when the packages are managed by a single project.
Whether this should be specified...
RFC 3516
RFC
2023-10-13
~15 min read
rust-lang.github.io
...The PhantomData<T> marker proposed by RFC 738 ("Support variance for type parameters") is a good match for this. This RFC assumes that either RFC 738 will be accepted, or if necessary, this RFC will be amended so that it itself adds the concept of PhantomData<T> to the language...
RFC 769
RFC
2013-08-29
~31 min read
rust-lang.github.io
...When a user calls get_context_ref, the requested type must match the type of an argument to provide_ref, e.g., the type of &self.backtrace is &Backtrace, so a call to get_context_ref::<Backtrace>() will return a reference to self.backtrace. An implementer can make multiple calls...
RFC 3192
RFC
2021-11-04
~15 min read
github.com
...artifact, or the crate name if not specified; for instance, it may be in lowercase, or contain dashes.
- For convenience, if the artifact name matches the original package name, cargo additionally supplies a copy of this variable with the `_<NAME>` suffix omitted. For instance, if the `cmake` crate supplies a...
RFC 3028
RFC
2020-11-30
~15 min read