## Summary Stabilize all string functions working with search patterns around a new generic API that provides a unified way to define and use those patterns. ## Motivation Right now, string slices define a couple of methods for string manip...
## Summary Pare back the `std::hash` module's API to improve ergonomics of usage and definitions. While an alternative scheme more in line with what Java and C++ have is considered, the current `std::hash` module will remain largely as-is w...
## Summary Lex binary and octal literals as if they were decimal. ## Motivation Lexing all digits (even ones not valid in the given base) allows for improved error messages & future proofing (this is more conservative than the current appro...
## Summary Allow macros in type positions ## Motivation Macros are currently allowed in syntax fragments for expressions, items, and patterns, but not for types. This RFC proposes to lift that restriction. 1. This would allow macros to be u...
## Summary Allow renaming imports when importing a group of symbols from a module. ```rust use std::io::{ Error as IoError, Result as IoResult, Read, Write } ``` ## Motivation The current design requires the above example to be written like...
## Summary Make all collections `impl<'a, T: Copy> Extend<&'a T>`. This enables both `vec.extend(&[1, 2, 3])`, and `vec.extend(&hash_set_of_ints)`. This partially covers the usecase of the awkward `Vec::push_all` with literally no ergonomic...
## Summary Remove panics from `CString::from_slice` and `CString::from_vec`, making these functions return `Result` instead. ## Motivation > As I shivered and brooded on the casting of that brain-blasting shadow, > I knew that I had at last...
## Summary Add a default lifetime bound for object types, so that it is no longer necessary to write things like `Box<Trait+'static>` or `&'a (Trait+'a)`. The default will be based on the context in which the object type appears. Typically,...
## Summary Add back the functionality of `Vec::from_elem` by improving the `vec![x; n]` sugar to work with Clone `x` and runtime `n`. ## Motivation High demand, mostly. There are currently a few ways to achieve the behaviour of `Vec::from_e...
## Summary [summary]: #summary The current compiler implements a more expansive semantics for pattern matching than was originally intended. This RFC introduces several mechanisms to reign in these semantics without actually breaking (much,...
## Summary Rust currently includes feature-gated support for type parameters that specify a default value. This feature is not well-specified. The aim of this RFC is to fully specify the behavior of defaulted type parameters: 1. Type parame...
## This RFC was previously approved, but later **withdrawn** For details see the [summary comment]. [summary comment]: https://github.com/rust-lang/rust/issues/27779#issuecomment-378416911 ## Summary * Change placement-new syntax from: `box...
## Summary Add type ascription to expressions. (An earlier version of this RFC covered type ascription in patterns too, that has been postponed). Type ascription on expression has already been implemented. See also discussion on [#354](http...
## Summary Add a `once` function to `std::iter` to construct an iterator yielding a given value one time, and an `empty` function to construct an iterator yielding no values. ## Motivation This is a common task when working with iterators....
## Summary Change Functional Record Update (FRU) for struct literal expressions to respect struct privacy. ## Motivation Functional Record Update is the name for the idiom by which one can write `..<expr>` at the end of a struct literal exp...
## Summary The `Fn` traits should be modified to make the return type an associated type. ## Motivation The strongest reason is because it would permit impls like the following (example from @alexcrichton): ```rust impl<R,F> Foo for F : FnM...
## Summary Add a new intrinsic, `discriminant_value` that extracts the value of the discriminant for enum types. ## Motivation Many operations that work with discriminant values can be significantly improved with the ability to extract the...
## Summary Add the syntax `..` for `std::ops::RangeFull`. ## Motivation Range expressions `a..b`, `a..` and `..b` all have dedicated syntax and produce first-class values. This means that they will be usable and useful in custom APIs, so fo...
## Summary Rename the `be` reserved keyword to `become`. ## Motivation A keyword needs to be reserved to support guaranteed tail calls in a backward-compatible way. Currently the keyword reserved for this purpose is `be`, but the `become` a...
## Summary The `Debug` trait is intended to be implemented by every type and display useful runtime information to help with debugging. This RFC proposes two additions to the fmt API, one of which aids implementors of `Debug`, and one which...