Version 1.21.0 (2017-10-12)
Language
- You can now use static references for literals.
Example:
fn main() { let x: &'static u32 = &0; } - Relaxed path syntax. Optional
::before<is now allowed in all contexts. Example:#![allow(unused)] fn main() { my_macro!(Vec<i32>::new); // Always worked my_macro!(Vec::<i32>::new); // Now works }
Compiler
- Upgraded jemalloc to 4.5.0
- Enabled unwinding panics on Redox
- Now runs LLVM in parallel during translation phase. This should reduce peak memory usage.
Libraries
- Generate builtin impls for
Clonefor all arrays and tuples that areT: Clone Stdin,Stdout, andStderrnow implementAsRawFd.RcandArcnow implementFrom<&[T]> where T: Clone,From<str>,From<String>,From<Box<T>> where T: ?Sized, andFrom<Vec<T>>.
Stabilized APIs
Cargo
- You can now call
cargo installwith multiple package names - Cargo commands inside a virtual workspace will now implicitly
pass
--all - Added a
[patch]section toCargo.tomlto handle prepublication dependencies RFC 1969 include&excludefields inCargo.tomlnow accept gitignore like patterns- Added the
--all-targetsoption - Using required dependencies as a feature is now deprecated and emits a warning
Misc
- Cargo docs are moving to doc.rust-lang.org/cargo
- The rustdoc book is now available at doc.rust-lang.org/rustdoc
- Added a preview of RLS has been made available through rustup
Install with
rustup component add rls-preview std::osdocumentation for Unix, Linux, and Windows now appears on doc.rust-lang.org Previously only showedstd::os::unix.
Compatibility Notes
- Changes in method matching against higher-ranked types This may cause breakage in subtyping corner cases. A more in-depth explanation is available.
- rustc's JSON error output's byte position start at top of file.
Was previously relative to the rustc's internal
CodeMapstruct which required the unstable librarylibsyntaxto correctly use. unused_resultslint no longer ignores booleans