Rust versions / 1.1
Rust release · Jun 25, 2015
Rust 1.1: what's new, what was stabilized
Short answerRust 1.1 was released on Jun 25, 2015.
← Rust 1.0All versionsRust 1.2 →
Can it break my build?
No compatibility notes were listed for this release.
Use it
rustup update stable # get the newest release
rustup install 1.1 # or exactly this one
rustup override set 1.1 # pin a project to itTo require at least this version from users of your crate, set rust-version = "1.1" under [package] in Cargo.toml. Cargo then refuses to build it on older compilers with a clear message, and with resolver 3 (the default on the 2024 edition, Rust 1.85+) it also prefers dependency versions that support it.
Full release notes
Highlights
- The [
std::fsmodule has been expanded][fs] to expand the set of functionality exposed: DirEntrynow supports optimizations likefile_typeandmetadatawhich don't incur a syscall on some platforms.- A
symlink_metadatafunction has been added. - The
fs::Metadatastructure now lowers to its OS counterpart, providing access to all underlying information. - The compiler now contains extended explanations of many errors. When an error with an explanation occurs the compiler suggests using the
--explainflag to read the explanation. Error explanations are also [available online][err-index]. - Thanks to multiple [improvements][sk] to [type checking][pre], as well as other work, the time to bootstrap the compiler decreased by 32%.
Libraries
- The [
str::split_whitespace] method splits a string on unicode whitespace boundaries. - On both Windows and Unix, new extension traits provide conversion of I/O types to and from the underlying system handles. On Unix, these traits are [
FromRawFd] and [AsRawFd], on WindowsFromRawHandleandAsRawHandle. These are implemented forFile,TcpStream,TcpListener, andUpdSocket. Further implementations forstd::processwill be stabilized later. - On Unix, [
std::os::unix::symlink] creates symlinks. On Windows, symlinks can be created withstd::os::windows::symlink_dirandstd::os::windows::symlink_file. - The
mpsc::Receivertype can now be converted into an iterator withinto_iteron the [IntoIterator] trait. Ipv4Addrcan be created fromu32with theFrom<u32>implementation of the [From] trait.- The
Debugimplementation forRangeFull[creates output that is more consistent with other implementations][rf]. - [
Debugis implemented forFile][file]. - The
Defaultimplementation forArc[no longer requiresSync + Send][arc]. - [The
Iteratormethodscount,nth, andlasthave been overridden for slices to have *O*(1) performance instead of *O*(*n*)][si]. - Incorrect handling of paths on Windows has been improved in both the compiler and the standard library.
- [
AtomicPtrgained aDefaultimplementation][ap]. - In accordance with Rust's policy on arithmetic overflow
absnow [panics on overflow when debug assertions are enabled][abs]. - The [
Cloned] iterator, which was accidentally left unstable for 1.0 [has been stabilized][c]. - The [
Incoming] iterator, which iterates over incoming TCP connections, and which was accidentally unnamable in 1.0, [is now properly exported][inc]. - [
BinaryHeap] no longer corrupts itself [when functions called bysift_uporsift_downpanic][bh]. - The [
split_off] method ofLinkedList[no longer corrupts the list in certain scenarios][ll].
Misc
- Type checking performance has improved notably with multiple improvements.
- The compiler suggests code changes for more errors.
- rustc and it's build system have experimental support for building toolchains against MUSL instead of glibc on Linux.
- The compiler defines the
target_envcfg value, which is used for distinguishing toolchains that are otherwise for the same platform. Presently this is set tognufor common GNU Linux targets and for MinGW targets, andmuslfor MUSL Linux targets. - The
cargo rustccommand invokes a build with custom flags to rustc. - Android executables are always position independent.
- The
drop_with_repr_externlint warns about mixingrepr(C)withDrop.
Release notes from the Rust project's RELEASES.md (MIT or Apache-2.0); summaries above are ours.
Up next
Next releaseRust 1.2Released Aug 7, 2015.Read it next →Also worth your time
Did this answer your question?