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
ethcore
crate 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
rustc
translates 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.rustc
presents 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
rustc
translates 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
TypeId
is correct in some cases where it was previously producing inconsistent results - The
mips-unknown-linux-gnu
target uses hardware floating point by default - The
rustc
arguments,--print target-cpus
,--print target-features
,--print relocation-models
, and--print code-models
print the available options to the-C target-cpu
,-C target-feature
,-C relocation-model
and-C code-model
code generation arguments rustc
supports 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
rustc
presents 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_
rustc
emits 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!
tt
matchers can be reparsed correctly, making them much more usefulmacro_rules!
stmt
matchers correctly consume the entire contents when inside non-braces invocations- Semicolons are properly required as statement delimiters inside
macro_rules!
invocations cfg_attr
works onpath
attributes
Stabilized APIs
Cell::as_ptr
RefCell::as_ptr
IpAddr::is_unspecified
IpAddr::is_loopback
IpAddr::is_multicast
Ipv4Addr::is_unspecified
Ipv6Addr::octets
LinkedList::contains
VecDeque::contains
ExitStatusExt::from_raw
. Both on Unix and Windows.Receiver::recv_timeout
RecvTimeoutError
BinaryHeap::peek_mut
PeekMut
iter::Product
iter::Sum
OccupiedEntry::remove_entry
VacantEntry::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_by
and[T]::binary_search_by_key
have been adjusted to be more flexible Option
implementsFrom
for its contained typeCell
,RefCell
andUnsafeCell
implementFrom
for their contained typeRwLock
panics if the reader count overflowsvec_deque::Drain
,hash_map::Drain
andhash_set::Drain
are covariantvec::Drain
andbinary_heap::Drain
are covariantCow<str>
implementsFromIterator
forchar
,&str
andString
- Sockets on Linux are correctly closed in subprocesses via
SOCK_CLOEXEC
hash_map::Entry
,hash_map::VacantEntry
andhash_map::OccupiedEntry
implementDebug
btree_map::Entry
,btree_map::VacantEntry
andbtree_map::OccupiedEntry
implementDebug
String
implementsAddAssign
- Variadic
extern fn
pointers implement theClone
,PartialEq
,Eq
,PartialOrd
,Ord
,Hash
,fmt::Pointer
, andfmt::Debug
traits FileType
implementsDebug
- References to
Mutex
andRwLock
are unwind-safe mpsc::sync_channel
Receiver
s return any available message before reporting a disconnect- Unicode definitions have been updated to 9.0
env
iterators 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 --target
work as expected - Speed up noop registry updates
- Update OpenSSL
- Fix
--panic=abort
with plugins - Always pass
-C metadata
to the compiler - Fix depending on git repos with workspaces
- Add a
--lib
flag tocargo new
- Add
http.cainfo
for custom certs - Indicate the compilation profile after compiling
- Allow enabling features for dependencies with
--features
- Add
--jobs
flag tocargo package
- Add
--dry-run
tocargo publish
- Add support for
RUSTDOCFLAGS
Performance
panic::catch_unwind
is more optimizedpanic::catch_unwind
no longer accesses thread-local storage on entry
Tooling
- Test binaries now support a
--test-threads
argument to specify the number of threads used to run tests, and which acts the same as theRUST_TEST_THREADS
environment variable - The test runner now emits a warning when tests run over 60 seconds
- rustdoc: Fix methods in search results
rust-lldb
warns 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
OsStr
s, 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
Debug
impl for strings no longer escapes all non-ASCII characters