Version 1.12.1 (2016-10-20)
Regression Fixes
- ICE: 'rustc' panicked at 'assertion failed: concrete_substs.is_normalized_for_trans()' #36381
- Confusion with double negation and booleans
- rustc 1.12.0 fails with SIGSEGV in release mode (syn crate 0.8.0)
- Rustc 1.12.0 Windows build of
ethcorecrate fails with LLVM error - 1.12.0: High memory usage when linking in release mode with debug info
- Corrupted memory after updated to 1.12
- "Let NullaryConstructor = something;" causes internal compiler error: "tried to overwrite interned AdtDef"
- Fix ICE: inject bitcast if types mismatch for invokes/calls/stores
- debuginfo: Handle spread_arg case in MIR-trans in a more stable way.
Version 1.12.0 (2016-09-29)
Highlights
rustctranslates code to LLVM IR via its own "middle" IR (MIR). This translation pass is far simpler than the previous AST->LLVM pass, and creates opportunities to perform new optimizations directly on the MIR. It was previously described on the Rust blog.rustcpresents a new, more readable error format, along with machine-readable JSON error output for use by IDEs. Most common editors supporting Rust have been updated to work with it. It was previously described on the Rust blog.
Compiler
rustctranslates code to LLVM IR via its own "middle" IR (MIR). This translation pass is far simpler than the previous AST->LLVM pass, and creates opportunities to perform new optimizations directly on the MIR. It was previously described on the Rust blog.- Print the Rust target name, not the LLVM target name, with
--print target-list - The computation of
TypeIdis correct in some cases where it was previously producing inconsistent results - The
mips-unknown-linux-gnutarget uses hardware floating point by default - The
rustcarguments,--print target-cpus,--print target-features,--print relocation-models, and--print code-modelsprint the available options to the-C target-cpu,-C target-feature,-C relocation-modeland-C code-modelcode generation arguments rustcsupports three new MUSL targets on ARM:arm-unknown-linux-musleabi,arm-unknown-linux-musleabihf, andarmv7-unknown-linux-musleabihf. These targets produce statically-linked binaries. There are no binary release builds yet though.
Diagnostics
rustcpresents a new, more readable error format, along with machine-readable JSON error output for use by IDEs. Most common editors supporting Rust have been updated to work with it. It was previously described on the Rust blog.- In error descriptions, references are now described in plain English, instead of as "&-ptr"
- In error type descriptions, unknown numeric types are named
{integer}or{float}instead of_ rustcemits a clearer error when inner attributes follow a doc comment
Language
macro_rules!invocations can be made withinmacro_rules!invocationsmacro_rules!meta-variables are hygienicmacro_rules!ttmatchers can be reparsed correctly, making them much more usefulmacro_rules!stmtmatchers correctly consume the entire contents when inside non-braces invocations- Semicolons are properly required as statement delimiters inside
macro_rules!invocations cfg_attrworks onpathattributes
Stabilized APIs
Cell::as_ptrRefCell::as_ptrIpAddr::is_unspecifiedIpAddr::is_loopbackIpAddr::is_multicastIpv4Addr::is_unspecifiedIpv6Addr::octetsLinkedList::containsVecDeque::containsExitStatusExt::from_raw. Both on Unix and Windows.Receiver::recv_timeoutRecvTimeoutErrorBinaryHeap::peek_mutPeekMutiter::Productiter::SumOccupiedEntry::remove_entryVacantEntry::into_key
Libraries
- The
format!macro and friends now allow a single argument to be formatted in multiple styles - The lifetime bounds on
[T]::binary_search_byand[T]::binary_search_by_keyhave been adjusted to be more flexible OptionimplementsFromfor its contained typeCell,RefCellandUnsafeCellimplementFromfor their contained typeRwLockpanics if the reader count overflowsvec_deque::Drain,hash_map::Drainandhash_set::Drainare covariantvec::Drainandbinary_heap::Drainare covariantCow<str>implementsFromIteratorforchar,&strandString- Sockets on Linux are correctly closed in subprocesses via
SOCK_CLOEXEC hash_map::Entry,hash_map::VacantEntryandhash_map::OccupiedEntryimplementDebugbtree_map::Entry,btree_map::VacantEntryandbtree_map::OccupiedEntryimplementDebugStringimplementsAddAssign- Variadic
extern fnpointers implement theClone,PartialEq,Eq,PartialOrd,Ord,Hash,fmt::Pointer, andfmt::Debugtraits FileTypeimplementsDebug- References to
MutexandRwLockare unwind-safe mpsc::sync_channelReceivers return any available message before reporting a disconnect- Unicode definitions have been updated to 9.0
enviterators implementDoubleEndedIterator
Cargo
- Support local mirrors of registries
- Add support for command aliases
- Allow
opt-level="s"/opt-level="z"in profile overrides - Make
cargo doc --open --targetwork as expected - Speed up noop registry updates
- Update OpenSSL
- Fix
--panic=abortwith plugins - Always pass
-C metadatato the compiler - Fix depending on git repos with workspaces
- Add a
--libflag tocargo new - Add
http.cainfofor custom certs - Indicate the compilation profile after compiling
- Allow enabling features for dependencies with
--features - Add
--jobsflag tocargo package - Add
--dry-runtocargo publish - Add support for
RUSTDOCFLAGS
Performance
panic::catch_unwindis more optimizedpanic::catch_unwindno longer accesses thread-local storage on entry
Tooling
- Test binaries now support a
--test-threadsargument to specify the number of threads used to run tests, and which acts the same as theRUST_TEST_THREADSenvironment variable - The test runner now emits a warning when tests run over 60 seconds
- rustdoc: Fix methods in search results
rust-lldbwarns about unsupported versions of LLDB- Rust releases now come with source packages that can be installed by rustup
via
rustup component add rust-src. The resulting source code can be used by tools and IDES, located in the sysroot underlib/rustlib/src.
Misc
- The compiler can now be built against LLVM 3.9
- Many minor improvements to the documentation.
- The Rust exception handling "personality" routine is now written in Rust
Compatibility Notes
- When printing Windows
OsStrs, unpaired surrogate codepoints are escaped with the lowercase format instead of the uppercase - When formatting strings, if "precision" is specified, the "fill", "align" and "width" specifiers are no longer ignored
- The
Debugimpl for strings no longer escapes all non-ASCII characters