Rust 1.25.0
Language
- The
#[repr(align(x))]attribute is now stable. RFC 1358 - You can now use nested groups of imports. e.g.
use std::{fs::File, io::Read, path::{Path, PathBuf}}; - You can now have
|at the start of a match arm. e.g.
enum Foo { A, B, C }
fn main() {
let x = Foo::A;
match x {
| Foo::A
| Foo::B => println!("AB"),
| Foo::C => println!("C"),
}
}Compiler
Libraries
- Impl Send for
process::Commandon Unix. - Impl PartialEq and Eq for
ParseCharError. UnsafeCell::into_inneris now safe.- Implement libstd for CloudABI.
Float::{from_bits, to_bits}is now available in libcore.- Implement
AsRef<Path>for Component - Implemented
WriteforCursor<&mut Vec<u8>> - Moved
Durationto libcore.
Stabilized APIs
The following functions can now be used in a constant expression. eg. static MINUTE: Duration = Duration::from_secs(60);
Cargo
cargo newno longer removesrustorrsprefixes/suffixes.cargo newnow defaults to creating a binary crate, instead of a library crate.
Misc
Compatibility Notes
- Deprecated
net::lookup_host. rustdochas switched to pulldown as the default markdown renderer.- The borrow checker was sometimes incorrectly permitting overlapping borrows around indexing operations (see #47349). This has been fixed (which also enabled some correct code that used to cause errors (e.g. #33903 and #46095).
- Removed deprecated unstable attribute
#[simd].