1.7.0 #
- Released on: 3 March, 2016
- Branched from master on: 15 January, 2016
Libraries #
- Stabilized APIs
Path
Path::strip_prefix
(renamed from relative_from)path::StripPrefixError
(new error type returned from strip_prefix)
Ipv4Addr
Ipv6Addr
Vec
String
- Slices
<[T]>::
clone_from_slice
, which now requires the two slices to be the same length<[T]>::
sort_by_key
- checked, saturated, and overflowing operations
i32::checked_rem
,i32::checked_neg
,i32::checked_shl
,i32::checked_shr
i32::saturating_mul
i32::overflowing_add
,i32::overflowing_sub
,i32::overflowing_mul
,i32::overflowing_div
i32::overflowing_rem
,i32::overflowing_neg
,i32::overflowing_shl
,i32::overflowing_shr
u32::checked_rem
,u32::checked_neg
,u32::checked_shl
,u32::checked_shl
u32::saturating_mul
u32::overflowing_add
,u32::overflowing_sub
,u32::overflowing_mul
,u32::overflowing_div
u32::overflowing_rem
,u32::overflowing_neg
,u32::overflowing_shl
,u32::overflowing_shr
- and checked, saturated, and overflowing operations for other primitive types
- FFI
ffi::IntoStringError
CString::into_string
CString::into_bytes
CString::into_bytes_with_nul
From<CString> for Vec<u8>
IntoStringError
IntoStringError::into_cstring
IntoStringError::utf8_error
Error for IntoStringError
- Hashing
- Validating UTF-8 is faster by a factor of between 7 and 14x for
ASCII input. This means that creating
String
s andstr
s from bytes is faster. - The performance of
LineWriter
(and thusio::stdout
) was improved by usingmemchr
to search for newlines. f32::to_degrees
andf32::to_radians
are stable. Thef64
variants were stabilized previously.BTreeMap
was rewritten to use less memory and improve the performance of insertion and iteration, the latter by as much as 5x.BTreeSet
and its iterators,Iter
,IntoIter
, andRange
are covariant over their contained type.LinkedList
and its iterators,Iter
andIntoIter
are covariant over their contained type.str::replace
now accepts aPattern
, like other string searching methods.Any
is implemented for unsized types.Hash
is implemented forDuration
.
Misc #
- When running tests with
--test
, rustdoc will pass--cfg
arguments to the compiler. - The compiler is built with RPATH information by default.
This means that it will be possible to run
rustc
when installed in unusual configurations without configuring the dynamic linker search path explicitly. rustc
passes--enable-new-dtags
to GNU ld. This makes any RPATH entries (emitted with-C rpath
) not take precedence overLD_LIBRARY_PATH
.
Cargo #
cargo rustc
accepts a--profile
flag that runsrustc
under any of the compilation profiles, ‘dev’, ‘bench’, or ’test’.- The
rerun-if-changed
build script directive no longer causes the build script to incorrectly run twice in certain scenarios.
Compatibility Notes #
- Soundness fixes to the interactions between associated types and lifetimes, specified in RFC 1214, now generate errors for code that violates the new rules. This is a significant change that is known to break existing code, so it has emitted warnings for the new error cases since 1.4 to give crate authors time to adapt. The details of what is changing are subtle; read the RFC for more.
- Several bugs in the compiler’s visibility calculations were
fixed. Since this was found to break significant amounts of
code, the new errors will be emitted as warnings for several release
cycles, under the
private_in_public
lint. - Defaulted type parameters were accidentally accepted in positions that were not intended. In this release, defaulted type parameters appearing outside of type definitions will generate a warning, which will become an error in future releases.
- Parsing “.” as a float results in an error instead of 0.
That is,
".".parse::<f32>()
returnsErr
, notOk(0.0)
. - Borrows of closure parameters may not outlive the closure.