1.18.0 (8 June, 2017) #
- Stabilize pub(restricted)
pubcan now accept a module path to make the item visible to just that module tree. Also accepts the keyword
crateto make something public to the whole crate but not users of the library. Example:
pub(crate) mod utils;. RFC 1422.
#![windows_subsystem]attribute conservative exposure of the
/SUBSYSTEMlinker flag on Windows platforms. RFC 1665.
- Refactor of trait object type parsing Now
tyin macros can accept types like
Write + Send, trailing
+are now supported in trait objects, and better error reporting for trait objects starting with
- 0e+10 is now a valid floating point literal
- Now warns if you bind a lifetime parameter to ‘static
- Tuples, Enum variant fields, and structs with no
reprattribute or with
#[repr(Rust)]are reordered to minimize padding and produce a smaller representation in some cases.
- rustc can now emit mir with
- Improved LLVM IR for trivial functions
- Added explanation for E0090(Wrong number of lifetimes are supplied)
- rustc compilation is now 15%-20% faster Thanks to optimisation opportunities found through profiling
- Improved backtrace formatting when panicking
vec::IntoIterif the iterator hasn’t been advanced the original
Vecis reassembled with no actual iteration or reallocation.
- Simplified HashMap Bucket interface provides performance improvements for iterating and cloning.
- Specialize Vec::from_elem to use calloc
- Fixed Race condition in fs::create_dir_all
- No longer caching stdio on Windows
- Optimized insertion sort in slice insertion sort in some cases 2.50%~ faster and in one case now 12.50% faster.
Stabilized APIs #
- Added partial Pijul support Pijul is a version control system in Rust.
You can now create new cargo projects with Pijul using
cargo new --vcs pijul
- Now always emits build script warnings for crates that fail to build
- Added Android build support
--testsflags now you can build all programs of a certain type, for example
cargo build --binswill build all binaries.
- Added support for haiku
- rustdoc can now use pulldown-cmark with the
- Rust now uses the official cross compiler for NetBSD
- rustdoc now accepts
#at the start of files
- Fixed jemalloc support for musl
Compatibility Notes #
Changes to how the
0flag works in format! Padding zeroes are now always placed after the sign if it exists and before the digits. With the
#flag the zeroes are placed after the prefix and before the digits.
Due to the struct field optimisation, using
transmuteon structs that have no
#[repr(Rust)]will no longer work. This has always been undefined behavior, but is now more likely to break in practice.
The refactor of trait object type parsing fixed a bug where
+was receiving the wrong priority parsing things like
&for<'a> Tr<'a> + Sendas
&(for<'a> Tr<'a> + Send)instead of
(&for<'a> Tr<'a>) + Send
rustc main.rs -o out --emit=asm,llvm-irNow will output
out.llinstead of only one of the filetypes.
calling a function that returns
Selfwill no longer work when the size of
Selfcannot be statically determined.
rustc now builds with a “pthreads” flavour of MinGW for Windows GNU this has caused a few regressions namely:
- Changed the link order of local static/dynamic libraries (respecting the order on given rather than having the compiler reorder).
- Changed how MinGW is linked, native code linked to dynamic libraries may require manually linking to the gcc support library (for the native code itself)