as has been defined as a saturating conversion. This was previously undefined behaviour, but you can use the {f64, f32}::to_int_unchecked methods to continue using the current behaviour, which may be desirable in rare performance sensitive situations.mem::Discriminant<T> now uses T's discriminant type instead of always using u64.macro_rules!) macro.target-feature flag. E.g. -C target-feature=+avx2 -C target-feature=+fma is now equivalent to -C target-feature=+avx2,+fma.force-unwind-tables flag. This option allows rustc to always generate unwind tables regardless of panic strategy.embed-bitcode flag. This codegen flag allows rustc to include LLVM bitcode into generated rlibs (this is on by default).tiny value to the code-model codegen flag.mipsel-sony-psp target.thumbv7a-uwp-windows-msvc target.* Refer to Rust‘s platform support page for more information on Rust’s tiered platform support.
net::{SocketAddr, SocketAddrV4, SocketAddrV6} now implements PartialOrd and Ord.proc_macro::TokenStream now implements Default.char with ops::{Range, RangeFrom, RangeFull, RangeInclusive, RangeTo} to iterate over a range of codepoints. E.g. you can now write the following;for ch in 'a'..='z' { print!("{}", ch); } println!(); // Prints "abcdefghijklmnopqrstuvwxyz"
OsString now implements FromStr.saturating_neg method as been added to all signed integer primitive types, and the saturating_abs method has been added for all integer primitive types.Arc<T>, Rc<T> now implement From<Cow<'_, T>>, and Box now implements From<Cow> when T is [T: Copy], str, CStr, OsStr, or Path.Box<[T]> now implements From<[T; N]>.BitOr and BitOrAssign are implemented for all NonZero integer types.fetch_min, and fetch_max methods have been added to all atomic integer types.fetch_update method has been added to all atomic integer types.Arc::as_ptrBTreeMap::remove_entryRc::as_ptrrc::Weak::as_ptrrc::Weak::from_rawrc::Weak::into_rawstr::strip_prefixstr::strip_suffixsync::Weak::as_ptrsync::Weak::from_rawsync::Weak::into_rawchar::UNICODE_VERSIONSpan::resolved_atSpan::located_atSpan::mixed_siteunix::process::CommandExt::arg0~~outdated information~~ becomes “{f32, f64}::powi now returns a slightly different value on Windows. This is due to changes in LLVM's intrinsics which {f32, f64}::powi uses.Syntax-only changes
#[cfg(FALSE)] mod foo { mod bar { mod baz; // `foo/bar/baz.rs` doesn't exist, but no error! } }
These are still rejected semantically, so you will likely receive an error but these changes can be seen and parsed by macros and conditional compilation.
-C codegen-units flag in incremental mode. Additionally when in incremental mode rustc defaults to 256 codegen units.catch_unwind to have zero-cost, unless unwinding is enabled and a panic is thrown.aarch64-unknown-none and aarch64-unknown-none-softfloat targets.arm64-apple-tvos and x86_64-apple-tvos targets.vec![] to map directly to Vec::new(). This allows vec![] to be able to be used in const contexts.convert::Infallible now implements Hash.OsString now implements DerefMut and IndexMut returning a &mut OsStr.String now implements From<&mut str>.IoSlice now implements Copy.Vec<T> now implements From<[T; N]>. Where N is at most 32.proc_macro::LexError now implements fmt::Display and Error.from_le_bytes, to_le_bytes, from_be_bytes, to_be_bytes, from_ne_bytes, and to_ne_bytes methods are now const for all integer types.PathBuf::with_capacityPathBuf::capacityPathBuf::clearPathBuf::reservePathBuf::reserve_exactPathBuf::shrink_to_fitf32::to_int_uncheckedf64::to_int_uncheckedLayout::align_toLayout::pad_to_alignLayout::arrayLayout::extendcargo tree command which will print a tree graph of your dependencies. E.g.mdbook v0.3.2 (/Users/src/rust/mdbook) ├── ammonia v3.0.0 │ ├── html5ever v0.24.0 │ │ ├── log v0.4.8 │ │ │ └── cfg-if v0.1.9 │ │ ├── mac v0.1.1 │ │ └── markup5ever v0.9.0 │ │ ├── log v0.4.8 (*) │ │ ├── phf v0.7.24 │ │ │ └── phf_shared v0.7.24 │ │ │ ├── siphasher v0.2.3 │ │ │ └── unicase v1.4.2 │ │ │ [build-dependencies] │ │ │ └── version_check v0.1.5 ...You can also display dependencies on multiple versions of the same crate with
cargo tree -d (short for cargo tree --duplicates)..a extension, rather than the previous .lib.-C no_integrated_as flag from rustc.file_name property in JSON output of macro errors now points the actual source file rather than the previous format of <NAME macros>. Note: this may not point to a file that actually exists on the user's system.mem::{zeroed, uninitialised} will now panic when used with types that do not allow zero initialization such as NonZeroU8. This was previously a warning.f64 to u32 using the as operator has been defined as a saturating operation. This was previously undefined behaviour, but you can use the {f64, f32}::to_int_unchecked methods to continue using the current behaviour, which may be desirable in rare performance sensitive situations.These changes provide no direct user facing benefits, but represent significant improvements to the internals and overall performance of rustc and related tools.
cargo package --list not working with unpublished dependencies.&{number} (e.g. &1.0) not having the type inferred correctly.#[cfg()] can now be used on if expressions.Syntax only changes
type Foo: Ord syntactically.self in all fn contexts.fn syntax + cleanup item parsing.item macro fragments can be interpolated into traits, impls, and extern blocks. For example, you may now write:macro_rules! mac_trait { ($i:item) => { trait T { $i } } } mac_trait! { fn foo() {} }
These are still rejected semantically, so you will likely receive an error but these changes can be seen and parsed by macros and conditional compilation.
rustc -D unused -A unused-variables denies everything in the unused lint group except unused-variables which is explicitly allowed. However, passing rustc -A unused-variables -D unused denies everything in the unused lint group including unused-variables since the allow flag is specified before the deny flag (and therefore overridden).windows-gnu.Arc<[T; N]>, Box<[T; N]>, and Rc<[T; N]>, now implement TryFrom<Arc<[T]>>,TryFrom<Box<[T]>>, and TryFrom<Rc<[T]>> respectively. Note These conversions are only available when N is 0..=32.u32::MAX or f32::NAN with no imports.u8::is_ascii is now const.String now implements AsMut<str>.primitive module to std and core. This module reexports Rust's primitive types. This is mainly useful in macros where you want avoid these types being shadowed.HashMap and HashSet.string::FromUtf8Error now implements Clone + Eq.[profile]s in your .cargo/config, or through your environment.CARGO_BIN_EXE_<name> pointing to a binary's executable path when running integration tests or benchmarks. <name> is the name of your binary as-is e.g. If you wanted the executable path for a binary named my-programyou would use env!("CARGO_BIN_EXE_my-program").const_err lint were deemed unrelated to const evaluation, and have been moved to the unconditional_panic and arithmetic_overflow lints.assert! macro is now a hard error. This has been a warning since 1.36.0.Self not having the correctly inferred type. This incorrectly led to some instances being accepted, and now correctly emits a hard error.These changes provide no direct user facing benefits, but represent significant improvements to the internals and overall performance of rustc and related tools.
opt-level=3 instead of 2.#[inline]-ing certain hot functions.Drop terminators for enum variants without drop glueYou can now use the slice pattern syntax with subslices. e.g.
fn foo(words: &[&str]) { match words { ["Hello", "World", "!", ..] => println!("Hello World!"), ["Foo", "Bar", ..] => println!("Baz"), rest => println!("{:?}", rest), } }
You can now use #[repr(transparent)] on univariant enums. Meaning that you can create an enum that has the exact layout and ABI of the type it contains.
There are some syntax-only changes:
default is syntactically allowed before items in trait definitions.impls (i.e. consts, types, and fns) may syntactically leave out their bodies in favor of ;.impls are now syntactically allowed (e.g. type Foo: Ord;).... (the C-variadic type) may occur syntactically directly as the type of any function parameter.These are still rejected semantically, so you will likely receive an error but these changes can be seen and parsed by procedural macros and conditional compilation.
armv7a-none-eabi.riscv64gc-unknown-linux-gnu.Option::{expect,unwrap} and Result::{expect, expect_err, unwrap, unwrap_err} now produce panic messages pointing to the location where they were called, rather than core's internals. * Refer to Rust‘s platform support page for more information on Rust’s tiered platform support.
iter::Empty<T> now implements Send and Sync for any T.Pin::{map_unchecked, map_unchecked_mut} no longer require the return type to implement Sized.io::Cursor now derives PartialEq and Eq.Layout::new is now const.riscv64gc-unknown-linux-gnu.CondVar::wait_whileCondVar::wait_timeout_whileDebugMap::keyDebugMap::valueManuallyDrop::takematches!ptr::slice_from_raw_parts_mutptr::slice_from_raw_partsError::description has been deprecated, and its use will now produce a warning. It's recommended to use Display/to_string instead.Copy implsLayout::repeatimpl<T> From<Foo> for Vec<T> {}.self position. E.g. you can now write fn foo(self: Box<Box<Self>>) {}. Previously only Self, &Self, &mut Self, Arc<Self>, Rc<Self>, and Box<Self> were allowed.format_args macro. Previously identifiers starting with an underscore were not allowed.pub) are now syntactically allowed on trait items and enum variants. These are still rejected semantically, but can be seen and parsed by procedural macros and conditional compilation.'labels.i686-unknown-dragonfly target.riscv64gc-unknown-linux-gnu target.@path syntax to rustc. Note that the format differs somewhat from what is found in other tooling; please see the documentation for more information.--extern flag without a path, indicating that it is available from the search path or specified with an -L flag.* Refer to Rust‘s platform support page for more information on Rust’s tiered platform support.
core::panic module is now stable. It was already stable through std.NonZero* numerics now implement From<NonZero*> if it's a smaller integer width. E.g. NonZeroU16 now implements From<NonZeroU8>.MaybeUninit<T> now implements fmt::Debug.Result::map_orResult::map_or_elsestd::rc::Weak::weak_countstd::rc::Weak::strong_countstd::sync::Weak::weak_countstd::sync::Weak::strong_countcargo-install will now reinstall the package if it detects that it is out of date.[profile.dev.package.image] opt-level = 2 sets the image crate's optimisation level to 2 for debug builds. You can also use [profile.<profile>.build-override] to override build scripts and their dependencies.edition in documentation code blocks to compile the block for that edition. E.g. edition2018 tells rustdoc that the code sample should be compiled the 2018 edition of Rust.--theme, and check the current theme with --check-theme.#[cfg(doc)] to compile an item when building documentation.You can now use tuple structs and tuple enum variant's constructors in const contexts. e.g.
pub struct Point(i32, i32); const ORIGIN: Point = { let constructor = Point; constructor(0, 0) };
You can now mark structs, enums, and enum variants with the #[non_exhaustive] attribute to indicate that there may be variants or fields added in the future. For example this requires adding a wild-card branch (_ => {}) to any match statements on a non-exhaustive enum. (RFC 2008)
You can now use function-like procedural macros in extern blocks and in type positions. e.g. type Generated = macro!();
The meta pattern matcher in macro_rules! now correctly matches the modern attribute syntax. For example (#[$m:meta]) now matches #[attr], #[attr{tokens}], #[attr[tokens]], and #[attr(tokens)].
thumbv7neon-unknown-linux-musleabihf target.aarch64-unknown-none-softfloat target.mips64-unknown-linux-muslabi64, and mips64el-unknown-linux-muslabi64 targets.* Refer to Rust‘s platform support page for more information on Rust’s tiered platform support.
BTreeMap::get_key_valueHashMap::get_key_valueOption::as_deref_mutOption::as_derefOption::flattenUdpSocket::peer_addrf32::to_be_bytesf32::to_le_bytesf32::to_ne_bytesf64::to_be_bytesf64::to_le_bytesf64::to_ne_bytesf32::from_be_bytesf32::from_le_bytesf32::from_ne_bytesf64::from_be_bytesf64::from_le_bytesf64::from_ne_bytesmem::takeslice::repeattodo!--all-features) passed to a virtual workspace will now produce an error. Previously these flags were ignored.dev-dependencies without including a version.include! macro will now warn if it failed to include the entire file. The include! macro unintentionally only includes the first expression in a file, and this can be unintuitive. This will become either a hard error in a future release, or the behavior may be fixed to include all expressions as expected.#[inline] on function prototypes and consts now emits a warning under unused_attribute lint. Using #[inline] anywhere else inside traits or extern blocks now correctly emits a hard error.async functions and blocks with async fn, async move {}, and async {} respectively, and you can now call .await on async expressions.cfg, cfg_attr, allow, warn, deny, forbid as well as inert helper attributes used by procedural macro attributes applied to items. e.g.fn len( #[cfg(windows)] slice: &[u16], #[cfg(not(windows))] slice: &[u8], ) -> usize { slice.len() }
if guards of match arms. e.g.fn main() { let array: Box<[u8; 4]> = Box::new([1, 2, 3, 4]); match array { nums // ---- `nums` is bound by move. if nums.iter().sum::<u8>() == 10 // ^------ `.iter()` implicitly takes a reference to `nums`. => { drop(nums); // ----------- Legal as `nums` was bound by move and so we have ownership. } _ => unreachable!(), } }
i686-unknown-uefi target.sparc64-unknown-openbsd target.--show-output argument to test binaries to print the output of successful tests.* Refer to Rust‘s platform support page for more information on Rust’s tiered platform support.
Vec::new and String::new are now const functions.LinkedList::new is now a const function.str::len, [T]::len and str::as_bytes are now const functions.abs, wrapping_abs, and overflowing_abs numeric functions are now const.version.--all flag has been renamed to --workspace. Using --all is now deprecated.rustdoc now requires rustc to be installed and in the same directory to run tests. This should improve performance when running a large amount of doctests.try! macro will now issue a deprecation warning. It is recommended to use the ? operator instead.asinh(-0.0) now correctly returns -0.0. Previously this returned 0.0.#[global_allocator] attribute can now be used in submodules.#[deprecated] attribute can now be used on macros.rustc. This will improve compilation times in some cases. For further information please refer to the “Evaluating pipelined rustc compilation” thread.aarch64-uwp-windows-msvc, i686-uwp-windows-gnu, i686-uwp-windows-msvc, x86_64-uwp-windows-gnu, and x86_64-uwp-windows-msvc targets.armv7-unknown-linux-gnueabi and armv7-unknown-linux-musleabi targets.hexagon-unknown-linux-musl target.riscv32i-unknown-none-elf target.* Refer to Rust‘s platform support page for more information on Rust’s tiered platform support.
ascii::EscapeDefault now implements Clone and Display.Clone, Debug, Hash) are now available at the same path as the trait. (e.g. The Clone derive macro is available at std::clone::Clone). This also makes all built-in macros available in std/core root. e.g. std::include_bytes!.str::Chars now implements Debug.slice::{concat, connect, join} now accepts &[T] in addition to &T.*const T and *mut T now implement marker::Unpin.Arc<[T]> and Rc<[T]> now implement FromIterator<T>.div_euclid, rem_euclid) to all numeric primitives. Additionally checked, overflowing, and wrapping versions are available for all integer primitives.thread::AccessError now implements Clone, Copy, Eq, Error, and PartialEq.iter::{StepBy, Peekable, Take} now implement DoubleEndedIterator.<*const T>::cast<*mut T>::castDuration::as_secs_f32Duration::as_secs_f64Duration::div_f32Duration::div_f64Duration::from_secs_f32Duration::from_secs_f64Duration::mul_f32Duration::mul_f64any::type_namecargo.--features option multiple times to enable multiple features.x86_64-unknown-uefi platform can not be built with rustc 1.38.0.armv7-unknown-linux-gnueabihf platform is known to have issues with certain crates such as libc.#[must_use] will now warn if the type is contained in a tuple, Box, or an array and unused.cfg and cfg_attr attributes on generic parameters.type MyOption = Option<u8>; fn increment_or_zero(x: MyOption) -> u8 { match x { MyOption::Some(y) => y + 1, MyOption::None => 0, } }
_ as an identifier for consts. e.g. You can write const _: u32 = 5;.#[repr(align(X)] on enums.? Kleene macro operator is now available in the 2015 edition.-C profile-generate and -C profile-use flags. For more information on how to use profile guided optimization, please refer to the rustc book.rust-lldb wrapper script should now work again.BufReader::bufferBufWriter::bufferCell::from_mutCell<[T]>::as_slice_of_cellsDoubleEndedIterator::nth_backOption::xorWrapping::reverse_bitsi128::reverse_bitsi16::reverse_bitsi32::reverse_bitsi64::reverse_bitsi8::reverse_bitsisize::reverse_bitsslice::copy_withinu128::reverse_bitsu16::reverse_bitsu32::reverse_bitsu64::reverse_bitsu8::reverse_bitsusize::reverse_bitsCargo.lock files are now included by default when publishing executable crates with executables.default-run="foo" in [package] to specify the default executable to use for cargo run.... for inclusive range patterns will now warn by default. Please transition your code to using the ..= syntax for inclusive ranges instead.dyn will now warn by default. Please transition your code to use dyn Trait for trait objects instead.dyn Send + fmt::Debug is now equivalent to dyn fmt::Debug + Send, where this was previously not the case.HashMap's implementation has been replaced with hashbrown::HashMap implementation.TryFromSliceError now implements From<Infallible>.mem::needs_drop is now available as a const fn.alloc::Layout::from_size_align_unchecked is now available as a const fn.String now implements BorrowMut<str>.io::Cursor now implements Default.NonNull::{dangling, cast} are now const fns.alloc crate is now stable. alloc allows you to use a subset of std (e.g. Vec, Box, Arc) in #![no_std] environments if the environment has access to heap memory allocation.String now implements From<&String>.dbg! macro. dbg! will return a tuple of each argument when there is multiple arguments.Result::{is_err, is_ok} are now #[must_use] and will produce a warning if not used.VecDeque::rotate_leftVecDeque::rotate_rightIterator::copiedio::IoSliceio::IoSliceMutRead::read_vectoredWrite::write_vectoredstr::as_mut_ptrmem::MaybeUninitpointer::align_offsetfuture::Futuretask::Contexttask::RawWakertask::RawWakerVTabletask::Wakertask::Poll--offline flag to run cargo without accessing the network.You can find further change's in Cargo's 1.36.0 release notes.
There have been numerous additions and fixes to clippy, see Clippy's 1.36.0 release notes for more details.
mem::MaybeUninit, mem::uninitialized use is no longer recommended, and will be deprecated in 1.39.0.FnOnce, FnMut, and the Fn traits are now implemented for Box<FnOnce>, Box<FnMut>, and Box<Fn> respectively.unsafe fn call_unsafe(func: unsafe fn()) { func() } pub fn main() { unsafe { call_unsafe(|| {}); } }
armv6-unknown-freebsd-gnueabihf and armv7-unknown-freebsd-gnueabihf targets.wasm32-unknown-wasi target.Thread will now show its ID in Debug output.StdinLock, StdoutLock, and StderrLock now implement AsRawFd.alloc::System now implements Default.Debug output ({:#?}) for structs now has a trailing comma on the last field.char::{ToLowercase, ToUppercase} now implement ExactSizeIterator.NonZero numeric types now implement FromStr.Read trait bounds on the BufReader::{get_ref, get_mut, into_inner} methods.dbg! macro without any parameters to print the file and line where it is called.str::make_ascii_lowercasehash_map::{OccupiedEntry, VacantEntry} now implement Sync and Send.f32::copysignf64::copysignRefCell::replace_withRefCell::map_splitptr::hashRange::containsRangeFrom::containsRangeTo::containsRangeInclusive::containsRangeToInclusive::containsOption::copiedcargo:rustc-cdylib-link-arg at build time to pass custom linker arguments when building a cdylib. Its usage is highly platform specific.redundant_closure Clippy lintmissing_const_for_fn Clippy lint#[deprecated = "reason"] as a shorthand for #[deprecated(note = "reason")]. This was previously allowed by mistake but had no effect.#[attr()],#[attr[]], and #[attr{}] procedural macros.extern crate self as foo; to import your crate's root into the extern prelude.riscv64imac-unknown-none-elf and riscv64gc-unknown-none-elf.-C linker-plugin-lto. This allows rustc to compile your Rust code into LLVM bitcode allowing LLVM to perform LTO optimisations across C/C++ FFI boundaries.powerpc64-unknown-freebsd.HashMap<K, V, S>'s and HashSet<T, S>'s basic methods. Most notably you no longer require the Hash trait to create an iterator.Ord trait bounds have been removed on some of BinaryHeap<T>'s basic methods. Most notably you no longer require the Ord trait to create an iterator.overflowing_neg and wrapping_neg are now const functions for all numeric types.str is now generic over all types that implement SliceIndex<str>.str::trim, str::trim_matches, str::trim_{start, end}, and str::trim_{start, end}_matches are now #[must_use] and will produce a warning if their returning type is unused.checked_pow, saturating_pow, wrapping_pow, and overflowing_pow are now available for all numeric types. These are equivalent to methods such as wrapping_add for the pow operation.Any::type_idError::type_idatomic::AtomicI16atomic::AtomicI32atomic::AtomicI64atomic::AtomicI8atomic::AtomicU16atomic::AtomicU32atomic::AtomicU64atomic::AtomicU8convert::Infallibleconvert::TryFromconvert::TryIntoiter::from_fniter::successorsnum::NonZeroI128num::NonZeroI16num::NonZeroI32num::NonZeroI64num::NonZeroI8num::NonZeroIsizeslice::sort_by_cached_keystr::escape_debugstr::escape_defaultstr::escape_unicodestr::split_ascii_whitespaceCommand::before_exec is being replaced by the unsafe method Command::pre_exec and will be deprecated with Rust 1.37.0.ATOMIC_{BOOL, ISIZE, USIZE}_INIT is now deprecated as you can now use const functions in static variables.cfg(target_vendor) attribute. E.g. #[cfg(target_vendor="apple")] fn main() { println!("Hello Apple!"); }u8 that covers 0..=255 and you would no longer be required to have a _ => unreachable!() case.if let and while let expressions. You can do this with the same syntax as a match expression. E.g.enum Creature { Crab(String), Lobster(String), Person(String), } fn main() { let state = Creature::Crab("Ferris"); if let Creature::Crab(name) | Creature::Person(name) = state { println!("This creature's name is: {}", name); } }
if let and while let patterns. Using this feature will by default produce a warning as this behaviour can be unintuitive. E.g. if let _ = 5 {}let bindings, assignments, expression statements, and irrefutable pattern destructuring in const functions.const unsafe fn foo() -> i32 { 5 } const fn bar() -> i32 { unsafe { foo() } }
cfg_attr attribute. E.g. #[cfg_attr(all(), must_use, optimize)]#[repr(packed)] attribute. E.g. #[repr(packed(2))] struct Foo(i16, i32); is a struct with an alignment of 2 bytes and a size of 6 bytes._. This allows you to import a trait's impls, and not have the name in the namespace. E.g.use std::io::Read as _; // Allowed as there is only one `Read` in the module. pub trait Read {}
Rc, Arc, and Pin as method receivers.rustc with the -Clinker-flavor command line argument.x86_64-fortanix-unknown-sgx target support has been upgraded to tier 2 support. Visit the platform support page for information on Rust's platform support.thumbv7neon-linux-androideabi and thumbv7neon-unknown-linux-gnueabihf targets.x86_64-unknown-uefi target.overflowing_{add, sub, mul, shl, shr} are now const functions for all numeric types.rotate_left, rotate_right, and wrapping_{add, sub, mul, shl, shr} are now const functions for all numeric types.is_positive and is_negative are now const functions for all signed numeric types.get method for all NonZero types is now const.count_ones, count_zeros, leading_zeros, trailing_zeros, swap_bytes, from_be, from_le, to_be, to_le are now const for all numeric types.Ipv4Addr::new is now a const functionunix::FileExt::read_exact_atunix::FileExt::write_all_atOption::transposeResult::transposeconvert::identitypin::Pinmarker::Unpinmarker::PhantomPinnedVec::resize_withVecDeque::resize_withDuration::as_millisDuration::as_microsDuration::as_nanoscargo publish --features or cargo publish --all-features.str::{trim_left, trim_right, trim_left_matches, trim_right_matches} are now deprecated in the standard library, and their usage will now produce a warning. Please use the str::{trim_start, trim_end, trim_start_matches, trim_end_matches} methods instead.Error::cause method has been deprecated in favor of Error::source which supports downcasting.--test-threads=1. It also runs the tests in deterministic order? operator in macro definitions. The ? operator allows you to specify zero or one repetitions similar to the * and + operators.super, self, or crate, will now always resolve to the item (enum, struct, etc.) available in the module if present, before resolving to a external crate or an item the prelude. E.g.enum Color { Red, Green, Blue } use Color::*;
PhantomData<T> types.literal specifier. This will match against a literal of any type. E.g. 1, 'A', "Hello World"struct Point(i32, i32); impl Point { pub fn new(x: i32, y: i32) -> Self { Self(x, y) } pub fn is_origin(&self) -> bool { match self { Self(0, 0) => true, _ => false, } } }
enum List<T> where Self: PartialOrd<Self> // can write `Self` instead of `List<T>` { Nil, Cons(T, Box<Self>) // likewise here }
#[must_use]. This provides a warning if a impl Trait or dyn Trait is returned and unused in the program.aarch64-pc-windows-msvc target.PathBuf now implements FromStr.Box<[T]> now implements FromIterator<T>.dbg! macro has been stabilized. This macro enables you to easily debug expressions in your rust program. E.g.let a = 2; let b = dbg!(a * 2) + 1; // ^-- prints: [src/main.rs:4] a * 2 = 4 assert_eq!(b, 5);
The following APIs are now const functions and can be used in a const context.
Cell::as_ptrUnsafeCell::getchar::is_asciiiter::emptyManuallyDrop::newManuallyDrop::into_innerRangeInclusive::startRangeInclusive::endNonNull::as_ptrslice::as_ptrstr::as_ptrDuration::as_secsDuration::subsec_millisDuration::subsec_microsDuration::subsec_nanosCStr::as_ptrIpv4Addr::is_unspecifiedIpv6Addr::newIpv6Addr::octetsi8::to_be_bytesi8::to_le_bytesi8::to_ne_bytesi8::from_be_bytesi8::from_le_bytesi8::from_ne_bytesi16::to_be_bytesi16::to_le_bytesi16::to_ne_bytesi16::from_be_bytesi16::from_le_bytesi16::from_ne_bytesi32::to_be_bytesi32::to_le_bytesi32::to_ne_bytesi32::from_be_bytesi32::from_le_bytesi32::from_ne_bytesi64::to_be_bytesi64::to_le_bytesi64::to_ne_bytesi64::from_be_bytesi64::from_le_bytesi64::from_ne_bytesi128::to_be_bytesi128::to_le_bytesi128::to_ne_bytesi128::from_be_bytesi128::from_le_bytesi128::from_ne_bytesisize::to_be_bytesisize::to_le_bytesisize::to_ne_bytesisize::from_be_bytesisize::from_le_bytesisize::from_ne_bytesu8::to_be_bytesu8::to_le_bytesu8::to_ne_bytesu8::from_be_bytesu8::from_le_bytesu8::from_ne_bytesu16::to_be_bytesu16::to_le_bytesu16::to_ne_bytesu16::from_be_bytesu16::from_le_bytesu16::from_ne_bytesu32::to_be_bytesu32::to_le_bytesu32::to_ne_bytesu32::from_be_bytesu32::from_le_bytesu32::from_ne_bytesu64::to_be_bytesu64::to_le_bytesu64::to_ne_bytesu64::from_be_bytesu64::from_le_bytesu64::from_ne_bytesu128::to_be_bytesu128::to_le_bytesu128::to_ne_bytesu128::from_be_bytesu128::from_le_bytesu128::from_ne_bytesusize::to_be_bytesusize::to_le_bytesusize::to_ne_bytesusize::from_be_bytesusize::from_le_bytesusize::from_ne_bytes_mm256_stream_si256, _mm256_stream_pd, _mm256_stream_ps have been changed from *const to *mut as the previous implementation was unsound.powerpc-unknown-netbsdimpl<'a> Reader for BufReader<'a> {} can now be impl Reader for BufReader<'_> {}. Lifetimes are still required to be defined in structs.const functions. These are currently a strict minimal subset of the const fn RFC. Refer to the language reference for what exactly is available.#[allow(clippy::filter_map)].#[no_mangle] and #[export_name] attributes can now be located anywhere in a crate, not just in exported functions.num::NonZero* types to their raw equivalents using the From trait. E.g. u8 now implements From<NonZeroU8>.&Option<T> into Option<&T> and &mut Option<T> into Option<&mut T> using the From trait.*) a time::Duration by a u32.slice::align_toslice::align_to_mutslice::chunks_exactslice::chunks_exact_mutslice::rchunksslice::rchunks_mutslice::rchunks_exactslice::rchunks_exact_mutOption::replacepackage key in your dependencies.r#), e.g. let r#for = true;crate in paths. This allows you to refer to the crate root in the path, e.g. use crate::foo; refers to foo in src/lib.rs.::. Previously, using a external crate in a module without a use statement required let json = ::serde_json::from_str(foo); but can now be written as let json = serde_json::from_str(foo);.#[used] attribute to static items to prevent the compiler from optimising them away, even if they appear to be unused, e.g. #[used] static FOO: u32 = 1;use syntax. Macros exported with #[macro_export] are now placed into the root module of the crate. If your macro relies on calling other local macros, it is recommended to export with the #[macro_export(local_inner_macros)] attribute so users won't have to import those macros.pub, pub(crate)) in macros using the vis specifier.#[attr("true")], and you can now write #[attr(true)].#[panic_handler] attribute.The following methods are replacement methods for trim_left, trim_right, trim_left_matches, and trim_right_matches, which will be deprecated in 1.33.0:
cargo run doesn't require specifying a package in workspaces.cargo doc now supports --message-format=json. This is equivalent to calling rustdoc --error-format=json.rustdoc allows you to specify what edition to treat your code as with the --edition option.rustdoc now has the --color (specify whether to output color) and --error-format (specify error format, e.g. json) options.rust-gdbgui script that invokes gdbgui with Rust debug symbols.rustfmt or clippy are now available, e.g. #[rustfmt::skip] will skip formatting the next item.rls-preview component on the windows-gnu targets has been restored.The standard library's str::repeat function contained an out of bounds write caused by an integer overflow. This has been fixed by deterministically panicking when an overflow happens.
Thank you to Scott McMurray for responsibly disclosing this vulnerability to us.
powerpc64le-unknown-linux-musl target.aarch64-unknown-hermit and x86_64-unknown-hermit targets.Once::call_once no longer requires Once to be 'static.BuildHasherDefault now implements PartialEq and Eq.Box<CStr>, Box<OsStr>, and Box<Path> now implement Clone.PartialEq<&str> for OsString and PartialEq<OsString> for &str.Cell<T> now allows T to be unsized.SocketAddr is now stable on Redox.--locked to disable this behavior.cargo-install will now allow you to cross compile an install using --target.cargo-fix subcommand to automatically move project code from 2015 edition to 2018.cargo doc can now optionally document private types using the --document-private-items flag.rustdoc now has the --cap-lints option which demotes all lints above the specified level to that level. For example --cap-lints warn will demote deny and forbid lints to warn.rustc and rustdoc will now have the exit code of 1 if compilation fails and 101 if there is a panic.rustup component add clippy-preview.str::{slice_unchecked, slice_unchecked_mut} are now deprecated. Use str::get_unchecked(begin..end) instead.std::env::home_dir is now deprecated for its unintuitive behavior. Consider using the home_dir function from https://crates.io/crates/dirs instead.rustc will no longer silently ignore invalid data in target spec.cfg attributes and --cfg command line flags are now more strictly validated.#[repr(transparent)] attribute is now stable. This attribute allows a Rust newtype wrapper (struct NewType<T>(T);) to be represented as the inner type across Foreign Function Interface (FFI) boundaries.pure, sizeof, alignof, and offsetof have been unreserved and can now be used as identifiers.GlobalAlloc trait and #[global_allocator] attribute are now stable. This will allow users to specify a global allocator for their program.#[test] attribute can now return Result<(), E: Debug> in addition to ().lifetime specifier for macro_rules! is now stable. This allows macros to easily target lifetimes.s and z optimisation levels are now stable. These optimisations prioritise making smaller binary sizes. z is the same as s with the exception that it does not vectorise loops, which typically results in an even smaller binary.--error-format=short this option will provide a more compressed output of rust error messages.macro_exports.Default for &mut str.From<bool> for all integer and unsigned number types.Extend for ().Debug implementation of time::Duration should now be more easily human readable. Previously a Duration of one second would printed as Duration { secs: 1, nanos: 0 } and will now be printed as 1s.From<&String> for Cow<str>, From<&Vec<T>> for Cow<[T]>, From<Cow<CStr>> for CString, From<CString>, From<CStr>, From<&CString> for Cow<CStr>, From<OsString>, From<OsStr>, From<&OsString> for Cow<OsStr>, From<&PathBuf> for Cow<Path>, and From<Cow<Path>> for PathBuf.Shl and Shr for Wrapping<u128> and Wrapping<i128>.DirEntry::metadata now uses fstatat instead of lstat when possible. This can provide up to a 40% speed increase.format!.Iterator::step_byPath::ancestorsSystemTime::UNIX_EPOCHalloc::GlobalAllocalloc::Layoutalloc::LayoutErralloc::Systemalloc::allocalloc::alloc_zeroedalloc::deallocalloc::reallocalloc::handle_alloc_errorbtree_map::Entry::or_defaultfmt::Alignmenthash_map::Entry::or_defaultiter::repeat_withnum::NonZeroUsizenum::NonZeroU128num::NonZeroU16num::NonZeroU32num::NonZeroU64num::NonZeroU8ops::RangeBoundsslice::SliceIndexslice::from_mutslice::from_ref{Any + Send + Sync}::downcast_mut{Any + Send + Sync}::downcast_ref{Any + Send + Sync}::issrc directory. The src directory in a crate should be considered to be immutable.suggestion_applicability field in rustc's json output is now stable. This will allow dev tools to check whether a code suggestion would apply to them.trait Trait {} impl Trait + Send { fn test(&self) { println!("one"); } //~ ERROR duplicate definitions with name `test` } impl Trait + Send + Send { fn test(&self) { println!("two"); } }
rustdoc would execute plugins in the /tmp/rustdoc/plugins directory when running, which enabled executing code as some other user on a given machine. This release fixes that vulnerability; you can read more about this on the blog. The associated CVE is CVE-2018-1000622.
Thank you to Red Hat for responsibly disclosing this vulnerability to us.
proc to be used as an identifier.Trait syntax, and should make it clearer when being used in tandem with impl Trait because it is equivalent to the following syntax: &Trait == &dyn Trait, &mut Trait == &mut dyn Trait, and Box<Trait> == Box<dyn Trait>.fn foo<#[lifetime_attr] 'a, #[type_attr] T: 'a>() {}#[must_use] attribute can now also be used on functions as well as types. It provides a lint that by default warns users when the value returned by a function has not been used.arch::x86 & arch::x86_64 modules which contain SIMD intrinsics, a new macro called is_x86_feature_detected!, the #[target_feature(enable="")] attribute, and adding target_feature = "" to the cfg attribute.[u8], f32, and f64 previously only available in std are now available in core.Rhs type parameter on ops::{Shl, ShlAssign, Shr} now defaults to Self.std::str::replace now has the #[must_use] attribute to clarify that the operation isn't done in place.Clone::clone, Iterator::collect, and ToOwned::to_owned now have the #[must_use] attribute to warn about unused potentially expensive allocations.DoubleEndedIterator::rfindDoubleEndedIterator::rfoldDoubleEndedIterator::try_rfoldDuration::from_microsDuration::from_nanosDuration::subsec_microsDuration::subsec_millisHashMap::remove_entryIterator::try_foldIterator::try_for_eachNonNull::castOption::filterString::replace_rangeTake::set_limithint::unreachable_uncheckedos::unix::process::parent_idptr::swap_nonoverlappingslice::rsplit_mutslice::rsplitslice::swap_with_slicecargo-metadata now includes authors, categories, keywords, readme, and repository fields.cargo-metadata now includes a package's metadata table.--target-dir optional argument. This allows you to specify a different directory than target for placing compilation artifacts.[[bin]], and have other binaries in locations where cargo would infer a binary, Cargo will produce a warning. You can disable this feature ahead of time by setting any of the following to false: autobins, autobenches, autoexamples, autotests.CARGO_CACHE_RUSTC_INFO=0 in your environment.doc.rust-lang.org are now searchable.CharExt or StrExt method directly on core will no longer work. e.g. ::core::prelude::v1::StrExt::is_empty("") will not compile, "".is_empty() will still compile.Debug output on atomic::{AtomicBool, AtomicIsize, AtomicPtr, AtomicUsize} will only print the inner type. E.g. print!("{:?}", AtomicBool::new(true)) will print true, not AtomicBool(true).repr(align(N)) is now 2²⁹. Previously you could enter higher numbers but they were not supported by LLVM. Up to 512MB alignment should cover all use cases..description() method on the std::error::Error trait has been soft-deprecated. It is no longer required to implement it.fn main() -> impl Trait no longer works for non-Termination trait. This reverts an accidental stabilization.NaN > NaN no longer returns true in const-fn contexts.impl Trait in method arguments.Copy and/or Clone if all captured variables implement either or both traits.for x in 0..=10 is now stable.'_ lifetime is now stable. The underscore lifetime can be used anywhere a lifetime can be elided.impl Trait is now stable allowing you to have abstract types in returns or in function parameters. E.g. fn foo() -> impl Iterator<Item=u8> or fn open(path: impl AsRef<Path>).u128 and i128 are now stable.main can now return Result<(), E: Debug> in addition to ().let points = [1, 2, 3, 4]; match points { [1, 2, 3, 4] => println!("All points were sequential."), _ => println!("Not all points were sequential."), }
wasm32-unknown-unknown.--remap-path-prefix option to rustc. Allowing you to remap path prefixes outputted by the compiler.powerpc-unknown-netbsd target.From<u16> for usize & From<{u8, i16}> for isize.assert!(format!("{:02x?}", b"Foo\0") == "[46, 6f, 6f, 00]")Default, Hash for cmp::Reverse.str::repeat being 8x faster in large cases.ascii::escape_default is now available in libcore.Copy, Clone for cmp::ReverseClone for char::{ToLowercase, ToUppercase}.*const T::add*const T::copy_to_nonoverlapping*const T::copy_to*const T::read_unaligned*const T::read_volatile*const T::read*const T::sub*const T::wrapping_add*const T::wrapping_sub*mut T::add*mut T::copy_to_nonoverlapping*mut T::copy_to*mut T::read_unaligned*mut T::read_volatile*mut T::read*mut T::replace*mut T::sub*mut T::swap*mut T::wrapping_add*mut T::wrapping_sub*mut T::write_bytes*mut T::write_unaligned*mut T::write_volatile*mut T::writeBox::leakFromUtf8Error::as_bytesLocalKey::try_withOption::clonedbtree_map::Entry::and_modifyfs::read_to_stringfs::readfs::writehash_map::Entry::and_modifyiter::FusedIteratorops::RangeInclusiveops::RangeToInclusiveprocess::idslice::rotate_leftslice::rotate_rightString::retain-v is passed with --listFn trait as dyn no longer works. E.g. the following syntax is now invalid.use std::ops::Fn as dyn;
fn g(_: Box<dyn(std::fmt::Debug)>) {}
'static. e.g.fn main() { const PAIR: &(i32, i32) = &(0, 1); let _reversed_pair: &'static _ = &(PAIR.1, PAIR.0); // Doesn't work }
AsciiExt trait in favor of inherent methods.".e0" will now no longer parse as 0.0 and will instead cause an error.#[repr(align(x))] attribute is now stable. RFC 1358use std::{fs::File, io::Read, path::{Path, PathBuf}};| at the start of a match arm. e.g.enum Foo { A, B, C } fn main() { let x = Foo::A; match x { | Foo::A | Foo::B => println!("AB"), | Foo::C => println!("C"), } }
process::Command on Unix.ParseCharError.UnsafeCell::into_inner is now safe.Float::{from_bits, to_bits} is now available in libcore.AsRef<Path> for ComponentWrite for Cursor<&mut Vec<u8>>Duration to libcore.The following functions can now be used in a constant expression. eg. static MINUTE: Duration = Duration::from_secs(60);
cargo new no longer removes rust or rs prefixs/suffixs.cargo new now defaults to creating a binary crate, instead of a library crate.net::lookup_host.rustdoc has switched to pulldown as the default markdown renderer.#[simd].sysv64 ffi is now available. eg. extern "sysv64" fn foo () {}codegen-units=1.armv4t-unknown-linux-gnueabi target.aarch64-unknown-openbsd supportstr::find::<char> now uses memchr. This should lead to a 10x improvement in performance in the majority of cases.OsStr's Debug implementation is now lossless and consistent with Windows.time::{SystemTime, Instant} now implement Hash.From<bool> for AtomicBoolFrom<{CString, &CStr}> for {Arc<CStr>, Rc<CStr>}From<{OsString, &OsStr}> for {Arc<OsStr>, Rc<OsStr>}From<{PathBuf, &Path}> for {Arc<Path>, Rc<Path>}AsciiExt methods onto charT: Sized requirement on ptr::is_null()From<RecvError> for {TryRecvError, RecvTimeoutError}f32::{min, max} to generate more efficient x86 assembly[u8]::contains now uses memchr which provides a 3x speed improvementThe following functions can now be used in a constant expression. eg. let buffer: [u8; size_of::<usize>()];, static COUNTER: AtomicUsize = AtomicUsize::new(1);
AtomicBool::newAtomicUsize::newAtomicIsize::newAtomicPtr::newCell::new{integer}::min_value{integer}::max_valuemem::size_ofmem::align_ofptr::nullptr::null_mutRefCell::newUnsafeCell::newworkspace.default-members config that overrides implied --all in virtual workspaces.Cargo.toml and .cargo/config to disable on a per-project or global basis respectively.Debug impl now always prints a decimal point.Ipv6Addr now rejects superfluous ::'s in IPv6 addresses This is in accordance with IETF RFC 4291 §2.2.Formatter::flags method is now deprecated. The sign_plus, sign_minus, alternate, and sign_aware_zero_pad should be used instead.column!() macro is one-based instead of zero-basedfmt::Arguments can no longer be shared across threads#[repr(packed)] struct fields is now unsafeauto traits are now permitted in trait objects.TrapUnreachable in LLVM which should mitigate the impact of undefined behavior.assert_eq/ne macroFrom<*mut T> for AtomicPtr<T>From<usize/isize> for AtomicUsize/AtomicIsize.T: Sync requirement for RwLock<T>: SendT: Sized requirement for {<*const T>, <*mut T>}::as_ref and <*mut T>::as_mutThread::{park, unpark} implementationSliceExt::binary_search performance.FromIterator<()> for ()AsciiExt trait methods to primitive types. Use of AsciiExt is now deprecated.cargo uninstall foo bar uninstalls foo and bar.cargo checkcargo install --versionchar::escape_debug now uses Unicode 10 over 9.non_snake_case lint now allows extern no-mangle functionsT op= &T now works for numeric types. eg. let mut x = 2; x += &8;Drop are now allowed in const and static typesle32-unknown-naclarmv5te_unknown_linux_gnueabiBox<Error> now impls From<Cow<str>>std::mem::Discriminant is now guaranteed to be Send + Syncfs::copy now returns the length of the main stream on NTFS.Instant += Duration.Hasher for {&mut Hasher, Box<Hasher>}fmt::Debug for SplitWhitespace.Option<T> now impls Try This allows for using ? with Option types.examples folder that have a main.rs file.[root] to [package] in Cargo.lock Packages with the old format will continue to work and can be updated with cargo update.libbacktrace is now available on Apple platforms.compile_fail attribute for code fences in doc-comments. This now lets you specify that a given code example will fail to compile.4.0 from 2.3T op= &T for numeric types has broken some type inference casesfn main() { let x: &'static u32 = &0; }
:: before < is now allowed in all contexts. Example:my_macro!(Vec<i32>::new); // Always worked my_macro!(Vec::<i32>::new); // Now works
Clone for all arrays and tuples that are T: CloneStdin, Stdout, and Stderr now implement AsRawFd.Rc and Arc now implement From<&[T]> where T: Clone, From<str>, From<String>, From<Box<T>> where T: ?Sized, and From<Vec<T>>.cargo install with multiple package names--all[patch] section to Cargo.toml to handle prepublication dependencies RFC 1969include & exclude fields in Cargo.toml now accept gitignore like patterns--all-targets optionrustup component add rls-previewstd::os documentation for Unix, Linux, and Windows now appears on doc.rust-lang.org Previously only showed std::os::unix.CodeMap struct which required the unstable library libsyntax to correctly use.unused_results lint no longer ignores booleanswasm32-experimental-emscripten target.msp430-none-elf target.{HashMap,BTreeMap}::{Keys,Values}.PartialEq, Eq, PartialOrd, Ord, Debug, Hash for unsized tuples.fmt::{Display, Debug} for Ref, RefMut, MutexGuard, RwLockReadGuard, RwLockWriteGuardClone for DefaultHasher.Sync for SyncSender.FromStr for char{f32, f64}::{is_sign_negative, is_sign_positive} handles NaN.unimplemented!() macro. ie. unimplemented!("Waiting for 1.21 to be stable")pub(restricted) is now supported in the thread_local! macro.{f32, f64}::{min, max} in Rust instead of using CMath.ops::{Range, RangeFrom} is now done in O(1) time#[repr(align(N))] attribute max number is now 2^31 - 1. This was previously 2^15.{OsStr, Path}::Display now avoids allocations where possibleCStr::into_c_stringCString::as_c_strCString::into_boxed_c_strChain::get_mutChain::get_refChain::into_innerOption::get_or_insert_withOption::get_or_insertOsStr::into_os_stringOsString::into_boxed_os_strTake::get_mutTake::get_refUtf8Error::error_lenchar::EscapeDebugchar::escape_debugcompile_error!f32::from_bitsf32::to_bitsf64::from_bitsf64::to_bitsmem::ManuallyDropslice::sort_unstable_by_keyslice::sort_unstable_byslice::sort_unstablestr::from_boxed_utf8_uncheckedstr::as_bytes_mutstr::as_bytes_mutstr::from_utf8_mutstr::from_utf8_unchecked_mutstr::get_mutstr::get_unchecked_mutstr::get_uncheckedstr::getstr::into_boxed_bytes~/.cargo/config to ~/.cargo/credentials.main.rs binaries that are in sub-directories of src/bin. ie. Having src/bin/server/main.rs and src/bin/client/main.rs generates target/debug/server and target/debug/clientcargo install using --vers.--no-fail-fast flag to cargo to run all benchmarks regardless of failure.include/exclude property in Cargo.toml now accepts gitignore paths instead of glob patterns. Glob patterns are now deprecated.'static in their return types will now not be as usable as if they were using lifetime parameters instead.{f32, f64}::is_sign_{negative, positive} now takes the sign of NaN into account where previously didn't.struct Point(u32, u32); let x = Point { 0: 7, 1: 0 };.loop can now return a value with break. RFC 1624 For example: let x = loop { break 7; };unions are now available. RFC 1444 They can only contain Copy types and cannot have a Drop implementation. Example: union Foo { bar: u8, baz: usize }fns, RFC 1558 Example: let foo: fn(u8) -> u8 = |v: u8| { v };arm-linux-androideabi to correspond to the armeabi official ABI. If you wish to continue targeting the armeabi-v7a ABI you should use --target armv7-linux-androideabi.aborting due to previous error(s) instead of aborting due to N previous errors This was previously inaccurate and would only count certain kinds of errors.target-feature=+crt-static option RFC 1721 Which allows libraries with C Run-time Libraries(CRT) to be statically linked.String now implements FromIterator<Cow<'a, str>> and Extend<Cow<'a, str>>Vec now implements From<&mut [T]>Box<[u8]> now implements From<Box<str>>SplitWhitespace now implements Clone[u8]::reverse is now 5x faster and [u16]::reverse is now 1.5x fastereprint! and eprintln! macros added to prelude. Same as the print! macros, but for printing to stderr.println!("cargo:rustc-env=FOO=bar");--all flag to the cargo bench subcommand to run benchmarks of all the members in a given workspace.libssh2-sys to 0.2.6--exclude option for excluding certain packages when using the --all option--features option now accepts multiple comma or space delimited values.rust-windbg.cmd for loading rust .natvis files in the Windows Debugger.# in rust documentation By adding additional #'s ie. ## is now #MutexGuard<T> may only be Sync if T is Sync.-Z flags are now no longer allowed to be used on the stable compiler. This has been a warning for a year previous to this.-Z flag change, the cargo-check plugin no longer works. Users should migrate to the built-in check command, which has been available since 1.16.._ is now a hard error. Example: 42._ .extern crate outside of its module is now a hard error. This was previously a warning.use ::self::foo; is now a hard error. self paths are always relative while the :: prefix makes a path absolute, but was ignored and the path was relative regardless.PartialEq & Eq used match patterns is now a hard error This was previously a warning.'_ are no longer allowed. This was previously a warning.#s are now visibleVCINSTALLDIR is set incorrectly, rustc will try to use it to find the linker, and the build will fail where it did not previouslypub can now accept a module path to make the item visible to just that module tree. Also accepts the keyword crate to 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 /SUBSYSTEM linker flag on Windows platforms. RFC 1665.ty in macros can accept types like Write + Send, trailing + are now supported in trait objects, and better error reporting for trait objects starting with ?Sized.repr attribute or with #[repr(Rust)] are reordered to minimize padding and produce a smaller representation in some cases.--emit mirVec::from_iter being passed vec::IntoIter if the iterator hasn't been advanced the original Vec is reassembled with no actual iteration or reallocation.AtomicBool::fetch_nandChild::try_waitHashMap::retainHashSet::retainPeekMut::popTcpStream::peekUdpSocket::peekUdpSocket::peek_fromcargo new --vcs pijul--bins and --tests flags now you can build all programs of a certain type, for example cargo build --bins will build all binaries.--enable-commonmark flag# at the start of filesChanges to how the 0 flag 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 transmute on structs that have no repr attribute or #[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> + Send as &(for<'a> Tr<'a> + Send) instead of (&for<'a> Tr<'a>) + Send
rustc main.rs -o out --emit=asm,llvm-ir Now will output out.asm and out.ll instead of only one of the filetypes.
calling a function that returns Self will no longer work when the size of Self cannot be statically determined.
rustc now builds with a “pthreads” flavour of MinGW for Windows GNU this has caused a few regressions namely:
'static. RFC 1623Self may be included in the where clause of impls. RFC 1647T and U when T: Unsize<U>. For example, coercing &mut [&'a X; N] to &mut [&'b X] requires 'a be equal to 'b. Soundness fix.[], automatically coerce--emit dep-info-C relocation-model more correctly determine whether the linker creates a position-independent executable-C overflow-checks to directly control whether integer overflow panicsSelf to appear in impl where clauses.usepanic=abort&str + &strArc::into_rawArc::from_rawArc::ptr_eqRc::into_rawRc::from_rawRc::ptr_eqOrdering::thenOrdering::then_withBTreeMap::rangeBTreeMap::range_mutcollections::Boundprocess::abortptr::read_unalignedptr::write_unalignedResult::expect_errCell::swapCell::replaceCell::into_innerCell::takeBTreeMap and BTreeSet can iterate over rangesCell can store non-Copy types. RFC 1651String implements FromIterator<&char>Box implements a number of new conversions: From<Box<str>> for String, From<Box<[T]>> for Vec<T>, From<Box<CStr>> for CString, From<Box<OsStr>> for OsString, From<Box<Path>> for PathBuf, Into<Box<str>> for String, Into<Box<[T]>> for Vec<T>, Into<Box<CStr>> for CString, Into<Box<OsStr>> for OsString, Into<Box<Path>> for PathBuf, Default for Box<str>, Default for Box<CStr>, Default for Box<OsStr>, From<&CStr> for Box<CStr>, From<&OsStr> for Box<OsStr>, From<&Path> for Box<Path>ffi::FromBytesWithNulError implements Error and DisplayPartialOrd<A> for [A] where A: Ordslice::sortToString trait specialization for Cow<'a, str> and StringBox<[T]> implements From<&[T]> where T: Copy, Box<str> implements From<&str>IpAddr implements From for various arrays. SocketAddr implements From<(I, u16)> where I: Into<IpAddr>format! estimates the needed capacity before writing a stringPathBuf implements DefaultPartialEq<[A]> for VecDeque<A>HashMap resizes adaptively to guard against DOS attacks and poor hash functions.cargo check --allcargo run --packagerequired_featuresbuild.rs is a build scriptworkspace_root link in containing memberrustbooki128rustc is linked statically on Windows MSVC targets, allowing it to run without installing the MSVC runtime.rustdoc --test includes file names in test namesstd for sparc64-unknown-linux-gnu, aarch64-unknown-linux-fuchsia, and x86_64-unknown-linux-fuchsia.aarch64-unknown-freebsdi686-unknown-netbsdTypeId implements PartialOrd and Ord--test-threads=0 produces an errorrustup installs documentation by defaultT and U when T: Unsize<U>, e.g. coercing &mut [&'a X; N] to &mut [&'b X] requires 'a be equal to 'b. Soundness fix.format! and Display::to_string panic if an underlying formatting implementation returns an error. Previously the error was silently ignored. It is incorrect for write_fmt to return an error when writing to a string.proc_macro_deriveshr_lifetime_in_assoc_type future-compatibility lint has been in effect since April of 2016.dead_code lint now accounts for type aliases.self in an import listSelf may appear in impl headersSelf may appear in struct expressionsrustc now supports --emit=metadata, which causes rustc to emit a .rmeta file containing only crate metadata. This can be used by tools like the Rust Language Service to perform metadata-only builds.transmute::<T, U> where T requires a bigger alignment than Urustc no longer attempts to provide “consider using an explicit lifetime” suggestions. They were inaccurate.VecDeque::truncateVecDeque::resizeString::insert_strDuration::checked_addDuration::checked_subDuration::checked_divDuration::checked_mulstr::replacenstr::repeatSocketAddr::is_ipv4SocketAddr::is_ipv6IpAddr::is_ipv4IpAddr::is_ipv6Vec::dedup_byVec::dedup_by_keyResult::unwrap_or_default<*const T>::wrapping_offset<*mut T>::wrapping_offsetCommandExt::creation_flagsFile::set_permissionsString::split_off[T]::binary_search and [T]::binary_search_by_key now take their argument by Borrow parameterDebugIpAddr implements From<Ipv4Addr> and From<Ipv6Addr>Ipv6Addr implements From<[u16; 8]>Stdin.read() when reading from the console on WindowsLineWriter&str slicing errorsTcpListener::set_only_v6 is deprecated. This functionality cannot be achieved in std currently.writeln!, like println!, now accepts a form with no string or formatting arguments, to just print a newlineiter::Sum and iter::Product for Resultstd_unicode::tableschar::EscapeDebug, EscapeDefault, EscapeUnicode, CaseMappingIter, ToLowercase, ToUppercase, implement DisplayDuration implements SumString implements ToSocketAddrscargo check command does a type check of a project without building itdebug, in addition to true and false. These are passed to rustc as the value to -C debuginfocargo --version --verbosebuild --alldoc --allrustdoc has a --sysroot argument that, like rustc, specifies the path to the Rust implementationarmv7-linux-androideabi target no longer enables NEON extensions, per Google's ABI guidedead_code lint now accounts for type aliases.Stdin.read() when reading from the console on Windowsself in an import list#[derive], aka “macros 1.1”, are stable. This allows popular code-generating crates like Serde and Diesel to work ergonomically. RFC 1681.legacy_imports lint since 1.14, with no known regressions.macro_rules, path fragments can now be parsed as type parameter bounds?Sized can be used in where clauses#![type_size_limit] crate attribute, similarly to the #![recursion_limit] attribute--test flag works with procedural macro cratesextern "aapcs" fn ABI-C no-stack-check flag is deprecated. It does nothing.format! expander recognizes incorrect printf and shell-style formatting directives and suggests the correct format.mk_ty calls in Ty::super_fold_withmk_ty calls in Ty::super_fold_withUnificationTable::probescope_auxiliary to cut RSS by 10%HirVec<P<T>> to HirVec<T> in hir::Exprstd::iter::Iterator::min_bystd::iter::Iterator::max_bystd::os::*::fs::FileExtstd::sync::atomic::Atomic*::get_mutstd::sync::atomic::Atomic*::into_innerstd::vec::IntoIter::as_slicestd::vec::IntoIter::as_mut_slicestd::sync::mpsc::Receiver::try_iterstd::os::unix::process::CommandExt::before_execstd::rc::Rc::strong_countstd::rc::Rc::weak_countstd::sync::Arc::strong_countstd::sync::Arc::weak_countstd::char::encode_utf8std::char::encode_utf16std::cell::Ref::clonestd::io::Take::into_innerIterator::nth no longer has a Sized boundExtend<&T> is specialized for Vec where T: Copy to improve performance.chars().count() is much faster and so are chars().last() and char_indices().last()std::env::argsfmt::DebugDefault for Durationmpsc::RecvTimeoutError implements ErrorOUT_DIR environment variable at build time via env!("OUT_DIR"). They should instead check the variable at runtime with std::env. That the value was set at build time was a bug, and incorrect when cross-compiling. This change is known to cause breakage.--all flag to cargo testcargo install --vers to take a semver versionbuild.rustflags config keybuild.rs in the same directory as Cargo.toml is a build script--message-format JSON when rustc emits non-JSON warnings--test) now support a --list argument that lists the tests it contains--exact argument that makes the test filter match exactly, instead of matching only a substring of the test name--playground-url flag#[should_panic] errors--disable-rustbuild to the configure script, but they will be deleted soon. Note that the new build system uses a different on-disk layout that will likely affect any scripts building Rust.legacy_imports lint since 1.14, with no known regressions.OUT_DIR environment variable at build time via env!("OUT_DIR"). They should instead check the variable at runtime with std::env. That the value was set at build time was a bug, and incorrect when cross-compiling. This change is known to cause breakage.hr_lifetime_in_assoc_type lint has been a warning since 1.10 and is now an error by default. It will become a hard error in the near future.legacy_directory_ownership lint, which is a warning in this release, and will become a hard error in the future.Peekable peeks a None it will return that None without re-querying the underlying iterator.. matches multiple tuple fields in enum variants, structs and tuples. RFC 1492.fn items can be coerced to unsafe fn pointersuse * and use ::* both glob-import from the crate rootVec<Box<Fn()>> without explicit dereferencingstatic mut names are linted like other statics and consts[u8; m!()])x”--version --verboseExpr_::ExprInlineAsmIchHasherSmallVector in CombineFields::instantiateArrayVec and AccumulateVec to reduce heap allocations during interning of sliceswrite_metadataCrateConfig clonesSubsts::super_fold_withObligationForest's NodeState handlingplug_leaksprintln!(), with no arguments, prints newline. Previously, an empty string was required to achieve the same.Wrapping impls standard binary and unary operators, as well as the Sum and Product iteratorsFrom<Cow<str>> for String and From<Cow<[T]>> for Vec<T>fold performance for chain, cloned, map, and VecDeque iteratorsSipHasher performance on small values.zip() specialization to .map() and .cloned()ReadDir implements DebugRefUnwindSafe for atomic typesVec::extend to Vec::extend_from_sliceDecoder::read_strio::Error implements From<io::ErrorKind>Debug for raw pointers to unsized dataHashMap random seedsHashMap is more cache-friendly, for significant improvements in some operationsHashMap uses less memory on 32-bit architecturesAdd<{str, Cow<str>}> for Cow<str>CARGO_HOMEreplace sections from lock filespanic configuration for test/bench profilesrustup target add. The new target triples are:mips-unknown-linux-gnumipsel-unknown-linux-gnumips64-unknown-linux-gnuabi64mips64el-unknown-linux-gnuabi64 powerpc-unknown-linux-gnupowerpc64-unknown-linux-gnupowerpc64le-unknown-linux-gnus390x-unknown-linux-gnu rustup target add:arm-unknown-linux-musleabiarm-unknown-linux-musleabihfarmv7-unknown-linux-musleabihfwasm32-unknown-emscripten target. This target is known to have major defects. Please test, report, and fix.rustup component add rust-docs to install.#[derive(PartialEq, Eq)]”'_ were erroneously allowed”Ordering enum may not be matched exhaustively#[no_link] breaks some obscure cases$crate macro variable is accepted in fewer locations? operator. ? is a simple way to propagate errors, like the try! macro, described in RFC 0243.#[derive] for empty tuple structs/variants-C link-arg argumentuse self when such an import resolvesassert_ne! and debug_assert_ne!vec_deque::Drain, hash_map::Drain, and hash_set::Drain covariantAsRef<[T]> for std::slice::IterDebug for std::vec::IntoIterCString: avoid excessive growth just to 0-terminateCoerceUnsized for {Cell, RefCell, UnsafeCell}Debug for std::path::{Components,Iter}charDebug for DirEntrygetaddrinfo returns EAI_SYSTEM retrieve actual error from errnoSipHasher is deprecated. Use DefaultHasher.std::io::ErrorKindVec::extend_from_slice, extend_with_elementcargo packagecargo installCommandExt::exec for cargo run on Unix--sysroot argument! from macro URLs and titlesSipHasher is deprecated. Use DefaultHasher.#[derive] for empty tuple structs/variants. Part of RFC 1506.ethcore crate fails with LLVM errorrustc 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.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 target-listTypeId is correct in some cases where it was previously producing inconsistent resultsmips-unknown-linux-gnu target uses hardware floating point by defaultrustc 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 argumentsrustc supports three new MUSL targets on ARM: arm-unknown-linux-musleabi, arm-unknown-linux-musleabihf, and armv7-unknown-linux-musleabihf. These targets produce statically-linked binaries. There are no binary release builds yet though.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.{integer} or {float} instead of _rustc emits a clearer error when inner attributes follow a doc commentmacro_rules! invocations can be made within macro_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 invocationsmacro_rules! invocationscfg_attr works on path attributesCell::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_keyformat! macro and friends now allow a single argument to be formatted in multiple styles[T]::binary_search_by and [T]::binary_search_by_key have been adjusted to be more flexibleOption implements From for its contained typeCell, RefCell and UnsafeCell implement From for their contained typeRwLock panics if the reader count overflowsvec_deque::Drain, hash_map::Drain and hash_set::Drain are covariantvec::Drain and binary_heap::Drain are covariantCow<str> implements FromIterator for char, &str and StringSOCK_CLOEXEChash_map::Entry, hash_map::VacantEntry and hash_map::OccupiedEntry implement Debugbtree_map::Entry, btree_map::VacantEntry and btree_map::OccupiedEntry implement DebugString implements AddAssignextern fn pointers implement the Clone, PartialEq, Eq, PartialOrd, Ord, Hash, fmt::Pointer, and fmt::Debug traitsFileType implements DebugMutex and RwLock are unwind-safempsc::sync_channel Receivers return any available message before reporting a disconnectenv iterators implement DoubleEndedIteratoropt-level="s" / opt-level="z" in profile overridescargo doc --open --target work as expected--panic=abort with plugins-C metadata to the compiler--lib flag to cargo newhttp.cainfo for custom certs--features--jobs flag to cargo package--dry-run to cargo publishRUSTDOCFLAGSpanic::catch_unwind is more optimizedpanic::catch_unwind no longer accesses thread-local storage on entry--test-threads argument to specify the number of threads used to run tests, and which acts the same as the RUST_TEST_THREADS environment variablerust-lldb warns about unsupported versions of LLDBrustup component add rust-src. The resulting source code can be used by tools and IDES, located in the sysroot under lib/rustlib/src.OsStrs, unpaired surrogate codepoints are escaped with the lowercase format instead of the uppercaseDebug impl for strings no longer escapes all non-ASCII characterscfg_attr attributes#[macro_use] works properly when it is itself expanded from a macroBinaryHeap::appendBTreeMap::appendBTreeMap::split_offBTreeSet::appendBTreeSet::split_offf32::to_degrees (in libcore - previously stabilized in libstd)f32::to_radians (in libcore - previously stabilized in libstd)f64::to_degrees (in libcore - previously stabilized in libstd)f64::to_radians (in libcore - previously stabilized in libstd)Iterator::sumIterator::productCell::get_mutRefCell::get_mutthread_local! macro supports multiple definitions in a single invocation, and can apply attributesCow implements DefaultWrapping implements binary, octal, lower-hex and upper-hex Display formattingHashlookup_host ignores unknown address typesassert_eq! accepts a custom error message, like assert! doesharness = false on [lib] sectionslinks contains a ‘.’-vv prints warnings for all crates.package.metadata keys. This provides room for expansion by arbitrary tools.cargo doc --open on WindowsHashMap hasher is SipHash 1-3 instead of SipHash 2-4 This hasher is faster, but is believed to provide sufficient protection from collision attacks.Ipv4Addr is 10x fasterconsts and statics may not have unsized typesmacro_rules! in order to ensure syntax forward-compatibility have been enabled This was an amendment to RFC 550, and has been a warning since 1.10.cfg attribute process has been refactored to fix various bugs. This causes breakage in some corner cases.Copy types are required to have a trivial implementation of Clone. RFC 1521.#[repr(..)] attribute.#[derive(RustcEncodable)] in the presence of other encode methods.panic! can be converted to a runtime abort with the -C panic=abort flag. RFC 1513.os::windows::fs::OpenOptionsExt::access_modeos::windows::fs::OpenOptionsExt::share_modeos::windows::fs::OpenOptionsExt::custom_flagsos::windows::fs::OpenOptionsExt::attributesos::windows::fs::OpenOptionsExt::security_qos_flagsos::unix::fs::OpenOptionsExt::custom_flagssync::Weak::newDefault for sync::Weakpanic::set_hookpanic::take_hookpanic::PanicInfopanic::PanicInfo::payloadpanic::PanicInfo::locationpanic::Locationpanic::Location::filepanic::Location::lineffi::CStr::from_bytes_with_nulffi::CStr::from_bytes_with_nul_uncheckedffi::FromBytesWithNulErrorfs::Metadata::modifiedfs::Metadata::accessedfs::Metadata::createdsync::atomic::Atomic{Usize,Isize,Bool,Ptr}::compare_exchangesync::atomic::Atomic{Usize,Isize,Bool,Ptr}::compare_exchange_weakcollections::{btree,hash}_map::{Occupied,Vacant,}Entry::keyos::unix::net::{UnixStream, UnixListener, UnixDatagram, SocketAddr}SocketAddr::is_unnamedSocketAddr::as_pathnameUnixStream::connectUnixStream::pairUnixStream::try_cloneUnixStream::local_addrUnixStream::peer_addrUnixStream::set_read_timeoutUnixStream::set_write_timeoutUnixStream::read_timeoutUnixStream::write_timeoutUnixStream::set_nonblockingUnixStream::take_errorUnixStream::shutdownUnixStreamUnixListener::bindUnixListener::acceptUnixListener::try_cloneUnixListener::local_addrUnixListener::set_nonblockingUnixListener::take_errorUnixListener::incomingUnixListenerUnixDatagram::bindUnixDatagram::unboundUnixDatagram::pairUnixDatagram::connectUnixDatagram::try_cloneUnixDatagram::local_addrUnixDatagram::peer_addrUnixDatagram::recv_fromUnixDatagram::recvUnixDatagram::send_toUnixDatagram::sendUnixDatagram::set_read_timeoutUnixDatagram::set_write_timeoutUnixDatagram::read_timeoutUnixDatagram::write_timeoutUnixDatagram::set_nonblockingUnixDatagram::take_errorUnixDatagram::shutdownUnixDatagram{BTree,Hash}Map::values_mut<[_]>::binary_search_by_keyabs_sub method of floats is deprecated. The semantics of this minor method are subtle and probably not what most people want.HashMaps can't be initialized with getrandom they will fall back to /dev/urandom temporarily to avoid blocking during early boot.Clone for binary_heap::IntoIter.Display and Hash for std::num::Wrapping.Default implementation for &CStr, CString.From<Vec<T>> and Into<Vec<T>> for VecDeque<T>.Default for UnsafeCell, fmt::Error, Condvar, Mutex, RwLock.profile.*.panic option. This controls the runtime behavior of the panic! macro and can be either “unwind” (the default), or “abort”. RFC 1513.-p arguments.CARGO_MANIFEST_LINKS environment variable that corresponds to the links field of the manifest.CARGO_HOME on Windows.net.retry value in .cargo/config.--force flag to cargo install.flock on NFS mounts.cargo install artifacts in temporary directories. Makes it possible to install multiple crates in parallel.cargo test --doc.cargo --explain.-q is passed.cargo doc --lib and --bin.HashMaps by caching the random keys used to initialize the hash state.find implementation for Chain iterators is 2x faster.#[derive(Copy, Clone)] to avoid bloat.fn type.&mut self to &mut mut self.std no longer prints backtraces on platforms where the running module must be loaded with env::current_exe, which can't be relied on.rust-gdb and rust-lldb scripts are distributed on all Unix platforms.libc::abort instead of generating an illegal instruction.AtomicBool is now bool-sized, not word-sized.target_env for Linux ARM targets is just gnu, not gnueabihf, gnueabi, etc.Duration::new.String::truncate to panic less.:block to the follow set for :ty and :path. Affects how macros are parsed.#[deprecated] attribute when applied to an API will generate warnings when used. The warnings may be suppressed with #[allow(deprecated)]. RFC 1270.fn item types are zero sized, and each fn names a unique type. This will break code that transmutes fns, so calling transmute on a fn type will generate a warning for a few cycles, then will be converted to an error.PATTERN_WHITE_SPACE category to be whitespace.std::panicstd::panic::catch_unwind (renamed from recover)std::panic::resume_unwind (renamed from propagate)std::panic::AssertUnwindSafe (renamed from AssertRecoverSafe)std::panic::UnwindSafe (renamed from RecoverSafe)str::is_char_boundary<*const T>::as_ref<*mut T>::as_ref<*mut T>::as_mutAsciiExt::make_ascii_uppercaseAsciiExt::make_ascii_lowercasechar::decode_utf16char::DecodeUtf16char::DecodeUtf16Errorchar::DecodeUtf16Error::unpaired_surrogateBTreeSet::takeBTreeSet::replaceBTreeSet::getHashSet::takeHashSet::replaceHashSet::getOsString::with_capacityOsString::clearOsString::capacityOsString::reserveOsString::reserve_exactOsStr::is_emptyOsStr::lenstd::os::unix::threadRawPthreadJoinHandleExtJoinHandleExt::as_pthread_tJoinHandleExt::into_pthread_tHashSet::hasherHashMap::hasherCommandExt::execFile::try_cloneSocketAddr::set_ipSocketAddr::set_portSocketAddrV4::set_ipSocketAddrV4::set_portSocketAddrV6::set_ipSocketAddrV6::set_portSocketAddrV6::set_flowinfoSocketAddrV6::set_scope_idslice::copy_from_sliceptr::read_volatileptr::write_volatileOpenOptions::create_newTcpStream::set_nodelayTcpStream::nodelayTcpStream::set_ttlTcpStream::ttlTcpStream::set_only_v6TcpStream::only_v6TcpStream::take_errorTcpStream::set_nonblockingTcpListener::set_ttlTcpListener::ttlTcpListener::set_only_v6TcpListener::only_v6TcpListener::take_errorTcpListener::set_nonblockingUdpSocket::set_broadcastUdpSocket::broadcastUdpSocket::set_multicast_loop_v4UdpSocket::multicast_loop_v4UdpSocket::set_multicast_ttl_v4UdpSocket::multicast_ttl_v4UdpSocket::set_multicast_loop_v6UdpSocket::multicast_loop_v6UdpSocket::set_multicast_ttl_v6UdpSocket::multicast_ttl_v6UdpSocket::set_ttlUdpSocket::ttlUdpSocket::set_only_v6UdpSocket::only_v6UdpSocket::join_multicast_v4UdpSocket::join_multicast_v6UdpSocket::leave_multicast_v4UdpSocket::leave_multicast_v6UdpSocket::take_errorUdpSocket::connectUdpSocket::sendUdpSocket::recvUdpSocket::set_nonblockingstd::sync::Once is poisoned if its initialization function fails.cell::Ref and cell::RefMut can contain unsized types.fmt::Debug.BufReader and BufWriter was reduced to 8K, from 64K. This is in line with the buffer size used by other languages.Instant, SystemTime and Duration implement += and -=. Duration additionally implements *= and /=.Skip is a DoubleEndedIterator.From<[u8; 4]> is implemented for Ipv4Addr.Chain implements BufRead.HashMap, HashSet and iterators are covariant.CARGO_PKG_AUTHORS environment variable.RUSTFLAGS variable to rustc on the commandline. rustc arguments can also be specified in the build.rustflags configuration key.ToString is specialized for str, giving it the same performance as to_owned.Command::output no longer creates extra threads.#[derive(PartialEq)] and #[derive(PartialOrd)] emit less code for C-like enums.--quiet flag to a test runner will produce much-abbreviated output.mips-unknown-linux-musl, mipsel-unknown-linux-musl, and i586-pc-windows-msvc targets.std::sync::Once is poisoned if its initialization function fails.impl blocks.fn item types are zero sized, and each fn names a unique type. This will break code that transmutes fns, so calling transmute on a fn type will generate a warning for a few cycles, then will be converted to an error.+= by implementing the AddAssign, SubAssign, MulAssign, DivAssign, RemAssign, BitAndAssign, BitOrAssign, BitXorAssign, ShlAssign, or ShrAssign traits. RFC 953.struct Foo { }, in addition to the non-braced form, struct Foo;. RFC 218.str::encode_utf16 (renamed from utf16_units)str::EncodeUtf16 (renamed from Utf16Units)Ref::mapRefMut::mapptr::drop_in_placetime::Instanttime::SystemTimeInstant::nowInstant::duration_since (renamed from duration_from_earlier)Instant::elapsedSystemTime::nowSystemTime::duration_since (renamed from duration_from_earlier)SystemTime::elapsedAdd/Sub impls for Time and SystemTimeSystemTimeErrorSystemTimeError::durationSystemTimeErrorUNIX_EPOCHAddAssign, SubAssign, MulAssign, DivAssign, RemAssign, BitAndAssign, BitOrAssign, BitXorAssign, ShlAssign, ShrAssign.write! and writeln! macros correctly emit errors if any of their arguments can't be formatted.raw modules, which contain a number of redefined C types are deprecated, including os::raw::unix, os::raw::macos, and os::raw::linux. These modules defined types such as ino_t and dev_t. The inconsistency of these definitions across platforms was making it difficult to implement std correctly. Those that need these definitions should use the libc crate. RFC 1415.MetadataExt traits, including os::unix::fs::MetadataExt, which expose values such as inode numbers no longer return platform-specific types, but instead return widened integers. RFC 1415.btree_set::{IntoIter, Iter, Range} are covariant.sync::mpsc implement fmt::Debug.--print targets flag prints a list of supported targets.--print cfg flag prints the cfgs defined for the current target.rustc can be built with an new Cargo-based build system, written in Rust. It will eventually replace Rust's Makefile-based build system. To enable it configure with configure --rustbuild.match patterns now list up to 3 missing variants while also indicating the total number of missing variants if more than 3.armv7-unknown-linux-gnueabihf, powerpc-unknown-linux-gnu, powerpc64-unknown-linux-gnu, powerpc64le-unknown-linux-gnu x86_64-rumprun-netbsd. These can be installed with tools such as multirust.cargo init creates a new Cargo project in the current directory. It is otherwise like cargo new.-v and --color. verbose and color, respectively, go in the [term] section of .cargo/config.build.jobs key can be set via CARGO_BUILD_JOBS. Environment variables take precedence over config files.cfg syntax for describing targets so that dependencies for multiple targets can be specified together. RFC 1361.CARGO_TARGET_ROOT, RUSTC, and RUSTDOC take precedence over the build.target-dir, build.rustc, and build.rustdoc configuration values.build.target configuration value sets the target platform, like --target.-Z flags have been considered unstable, and other flags that were considered unstable additionally required passing -Z unstable-options to access. Unlike unstable language and library features though, these options have been accessible on the stable release channel. Going forward, new unstable flags will not be available on the stable release channel, and old unstable flags will warn about their usage. In the future, all unstable flags will be unavailable on the stable release channel.match on empty enum variants using the Variant(..) syntax. This has been a warning since 1.6.MetadataExt traits, including os::unix::fs::MetadataExt, which expose values such as inode numbers no longer return platform-specific types, but instead return widened integers. RFC 1415.--cfg compiler flags are parsed strictly as identifiers.Command::spawn and its equivalents return an error if any of its command-line arguments contain interior NULs.rustc emits .lib files for the staticlib library type instead of .a files. Additionally, for the MSVC toolchain, rustc emits import libraries named foo.dll.lib instead of foo.lib.PathPath::strip_prefix (renamed from relative_from)path::StripPrefixError (new error type returned from strip_prefix)Ipv4AddrIpv6AddrVecString<[T]>::clone_from_slice, which now requires the two slices to be the same length<[T]>::sort_by_keyi32::checked_rem, i32::checked_neg, i32::checked_shl, i32::checked_shri32::saturating_muli32::overflowing_add, i32::overflowing_sub, i32::overflowing_mul, i32::overflowing_divi32::overflowing_rem, i32::overflowing_neg, i32::overflowing_shl, i32::overflowing_shru32::checked_rem, u32::checked_neg, u32::checked_shl, u32::checked_shlu32::saturating_mulu32::overflowing_add, u32::overflowing_sub, u32::overflowing_mul, u32::overflowing_divu32::overflowing_rem, u32::overflowing_neg, u32::overflowing_shl, u32::overflowing_shrffi::IntoStringErrorCString::into_stringCString::into_bytesCString::into_bytes_with_nulFrom<CString> for Vec<u8>IntoStringErrorIntoStringError::into_cstringIntoStringError::utf8_errorError for IntoStringErrorStrings and strs from bytes is faster.LineWriter (and thus io::stdout) was improved by using memchr to search for newlines.f32::to_degrees and f32::to_radians are stable. The f64 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, and Range are covariant over their contained type.LinkedList and its iterators, Iter and IntoIter are covariant over their contained type.str::replace now accepts a Pattern, like other string searching methods.Any is implemented for unsized types.Hash is implemented for Duration.--test, rustdoc will pass --cfg arguments to the compiler.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 over LD_LIBRARY_PATH.cargo rustc accepts a --profile flag that runs rustc under any of the compilation profiles, ‘dev’, ‘bench’, or ‘test’.rerun-if-changed build script directive no longer causes the build script to incorrectly run twice in certain scenarios.private_in_public lint.".".parse::<f32>() returns Err, not Ok(0.0).#![no_std] attribute causes a crate to not be linked to the standard library, but only the core library, as described in RFC 1184. The core library defines common types and traits but has no platform dependencies whatsoever, and is the basis for Rust software in environments that cannot support a full port of the standard library, such as operating systems. Most of the core library is now stable.Read::read_exact, ErrorKind::UnexpectedEof (renamed from UnexpectedEOF), fs::DirBuilder, fs::DirBuilder::new, fs::DirBuilder::recursive, fs::DirBuilder::create, os::unix::fs::DirBuilderExt, os::unix::fs::DirBuilderExt::mode, vec::Drain, vec::Vec::drain, string::Drain, string::String::drain, vec_deque::Drain, vec_deque::VecDeque::drain, collections::hash_map::Drain, collections::hash_map::HashMap::drain, collections::hash_set::Drain, collections::hash_set::HashSet::drain, collections::binary_heap::Drain, collections::binary_heap::BinaryHeap::drain, Vec::extend_from_slice (renamed from push_all), Mutex::get_mut, Mutex::into_inner, RwLock::get_mut, RwLock::into_inner, Iterator::min_by_key (renamed from min_by), Iterator::max_by_key (renamed from max_by).assert_eq! macro supports arguments that don't implement Sized, such as arrays. In this way it behaves more like assert!.Duration. These include Condvar::wait_timeout_ms, thread::sleep_ms, and thread::park_timeout_ms.Vec reserves additional elements was tweaked to not allocate excessive space while still growing exponentially.From conversions are implemented from integers to floats in cases where the conversion is lossless. Thus they are not implemented for 32-bit ints to f32, nor for 64-bit ints to f32 or f64. They are also not implemented for isize and usize because the implementations would be platform-specific. From is also implemented from f32 to f64.From<&Path> and From<PathBuf> are implemented for Cow<Path>.From<T> is implemented for Box<T>, Rc<T> and Arc<T>.IntoIterator is implemented for &PathBuf and &Path.BinaryHeap was refactored for modest performance improvements.$CARGO_HOME/bin for subcommands by default.rerun-if-changed key.cargo clean accepts a --release flag to clean the release folder. A variety of artifacts that Cargo failed to clean are now correctly deleted.unreachable_code lint warns when a function call's argument diverges.RUST_PATH environment variable when locating crates. This was a pre-cargo feature for integrating with the package manager that was accidentally never removed.Foo(..)) can no longer be used to match unit structs. This is a warning now, but will become an error in future releases. Patterns that share the same name as a const are now an error.BinaryHeap::from, BinaryHeap::into_sorted_vec, BinaryHeap::into_vec, Condvar::wait_timeout, FileTypeExt::is_block_device, FileTypeExt::is_char_device, FileTypeExt::is_fifo, FileTypeExt::is_socket, FileTypeExt, Formatter::alternate, Formatter::fill, Formatter::precision, Formatter::sign_aware_zero_pad, Formatter::sign_minus, Formatter::sign_plus, Formatter::width, Iterator::cmp, Iterator::eq, Iterator::ge, Iterator::gt, Iterator::le, Iterator::lt, Iterator::ne, Iterator::partial_cmp, Path::canonicalize, Path::exists, Path::is_dir, Path::is_file, Path::metadata, Path::read_dir, Path::read_link, Path::symlink_metadata, Utf8Error::valid_up_to, Vec::resize, VecDeque::as_mut_slices, VecDeque::as_slices, VecDeque::insert, VecDeque::shrink_to_fit, VecDeque::swap_remove_back, VecDeque::swap_remove_front, slice::split_first_mut, slice::split_first, slice::split_last_mut, slice::split_last, char::from_u32_unchecked, fs::canonicalize, str::MatchIndices, str::RMatchIndices, str::match_indices, str::rmatch_indices, str::slice_mut_unchecked, string::ParseError.~/.cargo/bin with the cargo install command. Among other things this makes it easier to augment Cargo with new subcommands: when a binary named e.g. cargo-foo is found in $PATH it can be invoked as cargo foo.*) dependencies will emit warnings when published. In 1.6 it will no longer be possible to publish crates with wildcard dependencies.AsRef and AsMut were added to Box, Rc, and Arc. Because these smart pointer types implement Deref, this causes breakage in cases where the interior type contains methods of the same name.Self are not object safe. Soundness fix.no_default_libraries setting that controls whether -nodefaultlibs is passed to the linker, and in turn the is_like_windows setting no longer affects the -nodefaultlibs flag.#[derive(Show)], long-deprecated, has been removed.#[inline] and #[repr] attributes can only appear in valid locations.#[no_debug] and #[omit_gdb_pretty_printer_section] are feature gated.use statements to import unstable features.improper_ctypes lint no longer warns about using isize and usize in FFI.Arc<T> and Rc<T> are covariant with respect to T instead of invariant.Default is implemented for mutable slices.FromStr is implemented for SockAddrV4 and SockAddrV6.From conversions between floating point types where the conversions are lossless.From conversions between integer types where the conversions are lossless.fs::Metadata implements Clone.parse method accepts a leading “+” when parsing integers.AsMut is implemented for Vec.clone_from implementations for String and BinaryHeap have been optimized and no longer rely on the default impl.extern "Rust", extern "C", unsafe extern "Rust" and unsafe extern "C" function types now implement Clone, PartialEq, Eq, PartialOrd, Ord, Hash, fmt::Pointer, and fmt::Debug for up to 12 arguments.Vecs is much faster in unoptimized builds when the element types don't implement Drop.VecDeque with zero-sized types was resolved.PartialOrd for slices is faster.str::lines and BufRead::lines iterators treat \r\n as line breaks in addition to \n.'static lifetime extend to the end of a function.str::parse no longer introduces avoidable rounding error when parsing floating point numbers. Together with earlier changes to float formatting/output, “round trips” like f.to_string().parse() now preserve the value of f exactly. Additionally, leading plus signs are now accepted.use statements that import multiple items can now rename them, as in use foo::{bar as kitten, baz as puppy}.pub extern crate, which does not behave as expected, issues a warning until a better solution is found.<Box<str>>::into_string, Arc::downgrade, Arc::get_mut, Arc::make_mut, Arc::try_unwrap, Box::from_raw, Box::into_raw, CStr::to_str, CStr::to_string_lossy, CString::from_raw, CString::into_raw, IntoRawFd::into_raw_fd, IntoRawFd, IntoRawHandle::into_raw_handle, IntoRawHandle, IntoRawSocket::into_raw_socket, IntoRawSocket, Rc::downgrade, Rc::get_mut, Rc::make_mut, Rc::try_unwrap, Result::expect, String::into_boxed_str, TcpStream::read_timeout, TcpStream::set_read_timeout, TcpStream::set_write_timeout, TcpStream::write_timeout, UdpSocket::read_timeout, UdpSocket::set_read_timeout, UdpSocket::set_write_timeout, UdpSocket::write_timeout, Vec::append, Vec::split_off, VecDeque::append, VecDeque::retain, VecDeque::split_off, rc::Weak::upgrade, rc::Weak, slice::Iter::as_slice, slice::IterMut::into_slice, str::CharIndices::as_str, str::Chars::as_str, str::split_at_mut, str::split_at, sync::Weak::upgrade, sync::Weak, thread::park_timeout, thread::sleep.BTreeMap::with_b, BTreeSet::with_b, Option::as_mut_slice, Option::as_slice, Result::as_mut_slice, Result::as_slice, f32::from_str_radix, f64::from_str_radix.std::io::copy allows ?Sized arguments.Windows, Chunks, and ChunksMut iterators over slices all override count, nth and last with an O(1) implementation.Default is implemented for arrays up to [T; 32].IntoRawFd has been added to the Unix-specific prelude, IntoRawSocket and IntoRawHandle to the Windows-specific prelude.Extend<String> and FromIterator<String are both implemented for String.IntoIterator is implemented for references to Option and Result.HashMap and HashSet implement Extend<&T> where T: Copy as part of RFC 839. This will cause type inference breakage in rare situations.BinaryHeap implements Debug.Borrow and BorrowMut are implemented for fixed-size arrays.extern fns with the “Rust” and “C” ABIs implement common traits including Eq, Ord, Debug, Hash.&mut T where T: std::fmt::Write also implements std::fmt::Write.VecDeque::push_back and other capacity-altering methods that caused panics for zero-sized types was fixed.isize and usize.cargo update.&'a Box<Trait> (or &'a Rc<Trait>, etc) will change from being interpreted as &'a Box<Trait+'a> to &'a Box<Trait+'static>.Duration API, has been stabilized. This basic unit of timekeeping is employed by other std APIs, as well as out-of-tree time crates.#[prelude_import] attribute, an internal implementation detail, was accidentally stabilized previously. It has been put behind the prelude_import feature gate. This change is believed to break no existing code.size_of_val and align_of_val is more sane for dynamically sized types. Code that relied on the previous behavior is thought to be broken.dropck rules, which checks that destructors can't access destroyed values, have been updated to match the RFC. This fixes some soundness holes, and as such will cause some previously-compiling code to no longer build.size_of_val and align_of_val is more sane for dynamically sized types. Code that relied on the previous behavior is not known to exist, and suspected to be broken.'static variables may now be recursive.ref bindings choose between Deref and DerefMut implementations correctly.dropck rules, which checks that destructors can't access destroyed values, have been updated to match the RFC.Duration API, has been stabilized, as well as the std::time module, which presently contains only Duration.Box<str> and Box<[T]> both implement Clone.CString, implements Borrow and the borrowed C string, CStr, implements ToOwned. The two of these allow C strings to be borrowed and cloned in generic code.CStr implements Debug.AtomicPtr implements Debug.Error trait objects can be downcast to their concrete types in many common configurations, using the is, downcast, downcast_ref and downcast_mut methods, similarly to the Any trait.contains, find, rfind, split. starts_with and ends_with are also faster.PartialEq for slices is much faster.Hash trait offers the default method, hash_slice, which is overridden and optimized by the implementations for scalars.Hasher trait now has a number of specialized write_* methods for primitive types, for efficiency.std::io::Error, gained a set of methods for accessing the ‘inner error’, if any: get_ref, get_mut, into_inner. As well, the implementation of std::error::Error::cause also delegates to the inner error.process::Child gained the id method, which returns a u32 representing the platform-specific process identifier.connect method on slices is deprecated, replaced by the new join method (note that both of these are on the unstable SliceConcatExt trait, but through the magic of the prelude are available to stable code anyway).Div operator is implemented for Wrapping types.DerefMut is implemented for String.HashMap) is better for long data.AtomicPtr implements Send.read_to_end implementations for Stdin and File are now specialized to use uninitialized buffers for increased performance.--explain flag.dropck pass, which checks that destructors can't access destroyed values, has been rewritten. This fixes some soundness holes, and as such will cause some previously-compiling code to no longer build.rustc now uses LLVM to write archive files where possible. Eventually this will eliminate the compiler's dependency on the ar utility.unused_mut, unconditional_recursion, improper_ctypes, and negate_unsigned lints are more strict.-Z no-landing-pads), panic! will kill the process instead of leaking.Rc to contain types without a fixed size, arrays and trait objects, finally enabling use of Rc<[T]> and completing the implementation of DST.-C codegen-units=N flag to rustc.to_uppercase and to_lowercase methods on char now do unicode case mapping, which is a previously-planned change in behavior and considered a bugfix.mem::align_of now specifies the minimum alignment for T, which is usually the alignment programs are interested in, and the same value reported by clang's alignof. mem::min_align_of is deprecated. This is not known to break real code.#[packed] attribute is no longer silently accepted by the compiler. This attribute did nothing and code that mentioned it likely did not work as intended.associated_type_defaults feature gate. In 1.1 associated type defaults did not work, but could be mentioned syntactically. As such this breakage has minimal impact.ref mut now correctly invoke DerefMut when matching against dereferenceable values.Extend trait, which grows a collection from an iterator, is implemented over iterators of references, for String, Vec, LinkedList, VecDeque, EnumSet, BinaryHeap, VecMap, BTreeSet and BTreeMap. RFC.iter::once function returns an iterator that yields a single element, and iter::empty returns an iterator that yields no elements.matches and rmatches methods on str return iterators over substring matches.Cell and RefCell both implement Eq.wrapping_div, wrapping_rem, wrapping_neg, wrapping_shl, wrapping_shr. These are in addition to the existing wrapping_add, wrapping_sub, and wrapping_mul methods, and alternatives to the Wrapping type.. It is illegal for the default arithmetic operations in Rust to overflow; the desire to wrap must be explicit.{:#?} formatting specifier displays the alternate, pretty-printed form of the Debug formatter. This feature was actually introduced prior to 1.0 with little fanfare.fmt::Formatter implements fmt::Write, a fmt-specific trait for writing data to formatted strings, similar to io::Write.fmt::Formatter adds ‘debug builder’ methods, debug_struct, debug_tuple, debug_list, debug_set, debug_map. These are used by code generators to emit implementations of Debug.str has new to_uppercase and to_lowercase methods that convert case, following Unicode case mapping.PoisonError type, returned by failing lock operations, exposes into_inner, get_ref, and get_mut, which all give access to the inner lock guard, and allow the poisoned lock to continue to operate. The is_poisoned method of RwLock and Mutex can poll for a poisoned lock without attempting to take the lock.FromRawFd trait is implemented for Stdio, and AsRawFd for ChildStdin, ChildStdout, ChildStderr. On Windows the FromRawHandle trait is implemented for Stdio, and AsRawHandle for ChildStdin, ChildStdout, ChildStderr.io::ErrorKind has a new variant, InvalidData, which indicates malformed input.rustc employs smarter heuristics for guessing at typos.rustc emits more efficient code for no-op conversions between unsafe pointers.std::fs module has been expanded to expand the set of functionality exposed:DirEntry now supports optimizations like file_type and metadata which don't incur a syscall on some platforms.symlink_metadata function has been added.fs::Metadata structure now lowers to its OS counterpart, providing access to all underlying information.--explain flag to read the explanation. Error explanations are also available online.str::split_whitespace method splits a string on unicode whitespace boundaries.FromRawFd and AsRawFd, on Windows FromRawHandle and AsRawHandle. These are implemented for File, TcpStream, TcpListener, and UpdSocket. Further implementations for std::process will be stabilized later.std::os::unix::symlink creates symlinks. On Windows, symlinks can be created with std::os::windows::symlink_dir and std::os::windows::symlink_file.mpsc::Receiver type can now be converted into an iterator with into_iter on the IntoIterator trait.Ipv4Addr can be created from u32 with the From<u32> implementation of the From trait.Debug implementation for RangeFull creates output that is more consistent with other implementations.Debug is implemented for File.Default implementation for Arc no longer requires Sync + Send.Iterator methods count, nth, and last have been overridden for slices to have O(1) performance instead of O(n).AtomicPtr gained a Default implementation.abs now panics on overflow when debug assertions are enabled.Cloned iterator, which was accidentally left unstable for 1.0 has been stabilized.Incoming iterator, which iterates over incoming TCP connections, and which was accidentally unnamable in 1.0, is now properly exported.BinaryHeap no longer corrupts itself when functions called by sift_up or sift_down panic.split_off method of LinkedList no longer corrupts the list in certain scenarios.target_env cfg value, which is used for distinguishing toolchains that are otherwise for the same platform. Presently this is set to gnu for common GNU Linux targets and for MinGW targets, and musl for MUSL Linux targets.cargo rustc command invokes a build with custom flags to rustc.drop_with_repr_extern lint warns about mixing repr(C) with Drop.#[stable]. It is no longer possible to use unstable features with a stable build of the compiler.0b1234 is now lexed as 0b1234 instead of two tokens, 0b1 and 234.PhantomFn and MarkerTrait lang items, which have been removed.extern crate "foo" as bar syntax has been replaced with extern crate foo as bar, and Cargo now automatically translates “-” in package names to underscore for the crate name.Send no longer implies 'static.MyType::default().SliceExt.Self: Sized in their where clause are considered object-safe, allowing many extension traits like IteratorExt to be merged into the traits they extended.where clause.Send and Sync are now library-defined.Any trait is effectively limited to concrete types. This helps retain the potentially-important “parametricity” property: generic code cannot behave differently for different type arguments except in minor ways.unsafe_destructor feature is now deprecated in favor of the new dropck. This change is a major reduction in unsafe code.thread_local module has been renamed to std::thread.IteratorExt have been moved to the Iterator trait itself.AsMut, AsRef, From, and Into have been centralized in the std::convert module.FromError trait was removed in favor of From.std::thread::sleep_ms.splitn function now takes an n parameter that represents the number of items yielded by the returned iterator instead of the number of ‘splits’.CLOEXEC by default.PartialOrd now order enums according to their explicitly-assigned discriminants.Patterns, implemented presently by &char, &str, FnMut(char) -> bool and some others.String::from_str has been deprecated in favor of the From impl, String::from.io::Error implements Sync.words method on &str has been replaced with split_whitespace, to avoid answering the tricky question, ‘what is a word?’#[stable]. This was the major library focus for this cycle.., adjusting the tradeoffs in favor of the most common usage.std were also stabilized during this cycle; about 75% of the non-deprecated API surface is now stable.Fn traits are now related via inheritance and provide ergonomic blanket implementations.Index and IndexMut traits were changed to take the index by value, enabling code like hash_map["string"] to work.Copy now inherits from Clone, meaning that all Copy data is known to be Clone as well.--explain flag to rustc.~1300 changes, numerous bugfixes
Highlights
io module remains temporarily at std::old_io.#![feature(...)] attribute. The impact of this change is described on the forum. RFC.Language
for loops now operate on the IntoIterator trait, which eliminates the need to call .iter(), etc. to iterate over collections. There are some new subtleties to remember though regarding what sort of iterators various types yield, in particular that for foo in bar { } yields values from a move iterator, destroying the original collection. RFC.Box<Trait+'static> when you don’t care about storing references. RFC.Drop, lifetimes must outlive the value. This will soon make it possible to safely implement Drop for types where #[unsafe_destructor] is now required. Read the gorgeous RFC for details.Deref<U> now automatically coerce to references to the dereferenced type U, e.g. &T where T: Deref<U> automatically coerces to &U. This should eliminate many unsightly uses of &*, as when converting from references to vectors into references to slices. RFC.|&:|, |&mut:|, |:|) is obsolete and closure kind is inferred from context.Self is a keyword.Libraries
Show and String formatting traits have been renamed to Debug and Display to more clearly reflect their related purposes. Automatically getting a string conversion to use with format!("{:?}", something_to_debug) is now written #[derive(Debug)].std::ff::{OsString, OsStr}, provide strings in platform-specific encodings for easier interop with system APIs. RFC.boxed::into_raw and Box::from_raw functions convert between Box<T> and *mut T, a common pattern for creating raw pointers.Tooling
/usr/local/lib/rustlib/uninstall.sh.#[rustc_on_unimplemented] attribute, requiring the ‘on_unimplemented’ feature, lets rustc display custom error messages when a trait is expected to be implemented for a type but is not.Misc
~2400 changes, numerous bugfixes
Highlights
isize and usize, rather than int and uint, for pointer-sized integers. Guidelines will be rolled out during the alpha cycle.std have been moved out of the Rust distribution into the Cargo ecosystem so they can evolve separately and don't need to be stabilized as quickly, including ‘time’, ‘getopts’, ‘num’, ‘regex’, and ‘term’.Language
where clauses provide a more versatile and attractive syntax for specifying generic bounds, though the previous syntax remains valid.str) more deeply into the type system, making it more consistent.i..j, i.., and ..j that produce range types and which, when combined with the Index operator and multidispatch, leads to a convenient slice notation, [i..j].[T; N].Copy trait is no longer implemented automatically. Unsafe pointers no longer implement Sync and Send so types containing them don't automatically either. Sync and Send are now ‘unsafe traits’ so one can “forcibly” implement them via unsafe impl if a type confirms to the requirements for them even though the internals do not (e.g. structs containing unsafe pointers like Arc). These changes are intended to prevent some footguns and are collectively known as opt-in built-in traits (though Sync and Send will soon become pure library types unknown to the compiler).String to be compared with &str.if let and while let are no longer feature-gated.macro_rules! has been declared stable. Though it is a flawed system it is sufficiently popular that it must be usable for 1.0. Effort has gone into future-proofing it in ways that will allow other macro systems to be developed in parallel, and won't otherwise impact the evolution of the language.vec![1i32, 2, 3].len() work as expected.#[derive(...)] not #[deriving(...)] for consistency with other naming conventions.self instead of mod, as in use foo::{self, bar}box operator and box patterns have been feature-gated pending a redesign. For now unique boxes should be allocated like other containers, with Box::new.Libraries
fail! macro has been renamed to panic! so that it is easier to discuss failure in the context of error handling without making clarifications as to whether you are referring to the ‘fail’ macro or failure more generally.OsRng prefers the new, more reliable getrandom syscall when available.Show formatter, typically implemented with #[derive(Show)] is now requested with the {:?} specifier and is intended for use by all types, for uses such as println! debugging. The new String formatter must be implemented by hand, uses the {} specifier, and is intended for full-fidelity conversions of things that can logically be represented as strings.Tooling
Misc
Option<Vec<T>> and Option<String> take up no more space than the inner types themselves.~1900 changes, numerous bugfixes
Highlights
std have been reviewed and updated for consistency with the in-development Rust coding guidelines. The standard library documentation tracks stabilization progress.Language
Index and IndexMut traits.if let construct takes a branch only if the let pattern matches, currently behind the ‘if_let’ feature gate.[0..4]) has been introduced behind the ‘slicing_syntax’ feature gate, and can be overloaded with the Slice or SliceMut traits... instead of prefix (.e.g. [a, b, c..]), for consistency with other uses of .. and to future-proof potential additional uses of the syntax.0..3 to 0...4 to be consistent with the exclusive range syntax for slicing.[a.., b, c]) has been put behind the ‘advanced_slice_patterns’ feature gate and may be removed in the future.value.0 syntax, currently behind the tuple_indexing feature gate.#[crate_id] attribute is no longer supported; versioning is handled by the package manager.extern crate foo as bar instead of extern crate bar = foo.use foo as bar instead of use bar = foo.let and match bindings and argument names in macros are now hygienic.move has been added as a keyword, for indicating closures that capture by value.Share trait is now called Sync to free up the term ‘shared’ to refer to ‘shared reference’ (the default reference type.Sized trait has been introduced, which qualifying types implement by default, and which type parameters expect by default. To specify that a type parameter does not need to be sized, write <Sized? T>. Most types are Sized, notable exceptions being unsized arrays ([T]) and trait types.!, as in || -> ! or proc() -> !.Gc<T> which was once denoted by the @ sigil, has finally been removed. GC will be revisited in the future.Libraries
std::time::Duration type has been added for use in I/O methods that rely on timers, as well as in the ‘time’ crate's Timespec arithmetic.collections::btree has been rewritten to have a more idiomatic and efficient design.Tooling
--crate-name flag can specify the name of the crate being compiled, like #[crate_name].-C metadata specifies additional metadata to hash into symbol names, and -C extra-filename specifies additional information to put into the output filename, for use by the package manager for versioning.-C codegen-units flag.Misc
~1700 changes, numerous bugfixes
Language
uint instead of any integral type.b.<'a>|A, B|: 'b + K -> Tpriv keyword has been removed from the language.use foo, bar, baz; syntax has been removed from the language.int, and floating point literals no longer default to f64. Literals must be suffixed with an appropriate type if inference cannot determine the type of the literal.Libraries
rev() on their forward-iteration counterparts.--cfg ndebug is passed to the compiler.Tooling
[breaking-change] to allow for easy discovery of breaking changes.mod foo;.pub use has been greatly improved.~1500 changes, numerous bugfixes
Language
@-pointers have been removed from the language.~[T]) have been removed from the language.~str) have been removed from the language.@str has been removed from the language.@[T] has been removed from the language.@self has been removed from the language.@Trait has been removed from the language.~ allocations which contain @ boxes inside the type for reference counting have been removed.macro_rules! macros as well as syntax extensions such as format!.#[deriving] with raw pointerslog_syntax! are now behind feature gates.#[simd] attribute is now behind a feature gate.extern crate statements, and unnecessary visibility (priv) is no longer allowed on use statements.do keyword has been removed, it is now a reserved keyword.extern mod is now extern crateFreeze trait has been removed.Share trait has been added for types that can be shared among threads.{} now.static mut locations has been tweaked.* and . operators are now overloadable through the Deref and DerefMut traits.~Trait and proc no longer have Send bounds by default._ type marker.Unsafe type was introduced for interior mutability. It is now considered undefined to transmute from &T to &mut T without using the Unsafe type.#[foo]; to #![foo].Pod was renamed to Copy.Libraries
libextra library has been removed. It has now been decomposed into component libraries with smaller and more focused nuggets of functionality. The full list of libraries can be found on the documentation index page.std::condition has been removed. All I/O errors are now propagated through the Result type. In order to assist with error handling, a try! macro for unwrapping errors with an early return and a lint for unused results has been added. See #12039 for more information.vec module has been renamed to slice.Vec<T>, has been added in preparation for DST. This will become the only growable vector in the future.std::io now has more public re-exports. Types such as BufferedReader are now found at std::io::BufferedReader instead of std::io::buffered::BufferedReader.print and println are no longer in the prelude, the print! and println! macros are intended to be used instead.Rc now has a Weak pointer for breaking cycles, and it no longer attempts to statically prevent cycles.slice::last()) now return Option<T> instead of T + failing.fmt::Default has been renamed to fmt::Show, and it now has a new deriving mode: #[deriving(Show)].ToStr is now implemented for all types implementing Show.&self instead of &Tinvert() method on iterators has been renamed to rev()std::num has seen a reduction in the genericity of its traits, consolidating functionality into a few core traits.RUST_BACKTRACE is present.eof() has been removed from the Reader trait. Specific types may still implement the function.assert_approx_eq! has been removede and E formatting specifiers for floats have been added to print them in exponential notation.Times trait has been removedstd::kinds::marker nowhash has been rewritten, IterBytes has been removed, and #[deriving(Hash)] is now possible.SharedChan has been removed, Sender is now cloneable.Chan and Port were renamed to Sender and Receiver.Chan::new is now channel().select! macro is now provided for selecting over Receivers.hashmap and trie have been moved to libcollectionsrun has been rolled into io::processassert_eq! now uses {} instead of {:?}rand has moved to librand.to_{lower,upper}case has been implemented for char.liblog.HashMap has been rewritten for higher performance and less memory usage.libnative. If libgreen is desired, it can be booted manually. The runtime guide has more information and examples.libgreen has been optimized with stack caching and various trimming of code.libgreen now have an unmapped guard page.extra::sync module has been updated to modern rust (and moved to the sync library), tweaking and improving various interfaces while dropping redundant functionality.Barrier type has been added to the sync library.base64 module has seen some improvement. It treats newlines better, has non-string error values, and has seen general cleanup.fourcc! macro was introducedhexfloat! macro was implemented for specifying floats via a hexadecimal literal.Tooling
rustpkg has been deprecated and removed from the main repository. Its replacement, cargo, is under development.--emit flag.--crate-type flag.-C flag.rustdoc improvements:~1800 changes, numerous bugfixes
Language
float type has been removed. Use f32 or f64 instead.#[feature(foo)] attribute.#[feature(managed_boxes)]) in preparation for future removal. Use the standard library's Gc or Rc types instead.@mut has been removed. Use std::cell::{Cell, RefCell} instead.continue instead of loop.r"foo" syntax or with matched hash delimiters, as in r###"foo"###.~fn is now written proc (args) -> retval { ... } and may only be called once.&fn type is now written |args| -> ret to match the literal form.@fns have been removed.do only works with procs in order to make it obvious what the cost of do is.#[link(...)] attribute has been replaced with #[crate_id = "name#vers"].impls must be terminated with empty braces and may not be terminated with a semicolon.self lifetime no longer has any special meaning.fmt! string formatting macro has been removed.printf! and printfln! (old-style formatting) removed in favor of print! and println!.mut works in patterns now, as in let (mut x, y) = (1, 2);.extern mod foo (name = "bar") syntax has been removed. Use extern mod foo = "bar" instead.alignof, offsetof, sizeof.asm! macro is feature-gated (#[feature(asm)]).as.repr attribute can be used to override the discriminant size, as in #[repr(int)] for integer-sized, and #[repr(C)] to match C enums.0o7777.concat! syntax extension performs compile-time string concatenation.#[fixed_stack_segment] and #[rust_stack] attributes have been removed as Rust no longer uses segmented stacks.#[feature(non_ascii_idents)])..., not *; ignoring remaining fields of a struct is also done with .., not _; ignoring a slice of a vector is done with .., not .._.rustc supports the “win64” calling convention via extern "win64".rustc supports the “system” calling convention, which defaults to the preferred convention for the target platform, “stdcall” on 32-bit Windows, “C” elsewhere.type_overflow lint (default: warn) checks literals for overflow.unsafe_block lint (default: allow) checks for usage of unsafe.attribute_usage lint (default: warn) warns about unknown attributes.unknown_features lint (default: warn) warns about unknown feature gates.dead_code lint (default: warn) checks for dead code.#[link_args] is behind the link_args feature gate.#[link(name = "foo")]#[link(name = "foo", kind = "static")]).#[link(name = "foo", kind = "framework")]).#[thread_local] attribute creates thread-local (not task-local) variables. Currently behind the thread_local feature gate.return keyword may be used in closures.Pod kind.cfg attribute can now be used on struct fields and enum variants.Libraries
option and result API's have been overhauled to make them simpler, more consistent, and more composable.std::io module has been replaced with one that is more comprehensive and that properly interfaces with the underlying scheduler. File, TCP, UDP, Unix sockets, pipes, and timers are all implemented.io::util contains a number of useful implementations of Reader and Writer, including NullReader, NullWriter, ZeroReader, TeeReader.extra::rc moved into std.Gc type in the gc module will replace @ (it is currently just a wrapper around it).Either type has been removed.fmt::Default can be implemented for any type to provide default formatting to the format! macro, as in format!("{}", myfoo).rand API continues to be tweaked.rust_begin_unwind function, useful for inserting breakpoints on failure in gdb, is now named rust_fail.each_key and each_value methods on HashMap have been replaced by the keys and values iterators.sys module to the mem module.path module was written and API changed.str::from_utf8 has been changed to cast instead of allocate.starts_with and ends_with methods added to vectors via the ImmutableEqVector trait, which is in the prelude.get_opt method, which returns None if the index is out of bounds.Any type can be used for dynamic typing.~Any can be passed to the fail! macro and retrieved via task::try._iter suffix now.cell::Cell and cell::RefCell can be used to introduce mutability roots (mutable fields, etc.). Use instead of e.g. @mut.util::ignore renamed to prelude::drop.sort and sort_by methods via the MutableVector trait.vec::raw has seen a lot of cleanup and API changes.comm module has been rewritten to be much faster, have a simpler, more consistent API, and to work for both native and green threading.flatpipes module had bitrotted and was removed.c_vec has been modernized.sort module has been removed. Use the sort method on mutable slices.Tooling
rust and rusti commands have been removed, due to lack of maintenance.rustdoc was completely rewritten.rustdoc can test code examples in documentation.rustpkg can test packages with the argument, ‘test’.rustpkg supports arbitrary dependencies, including C libraries.rustc's support for generating debug info is improved again.rustc has better error reporting for unbalanced delimiters.rustc's JIT support was removed due to bitrot.rustc adds a --dep-info flag for communicating dependencies to build tools.~2200 changes, numerous bugfixes
Language
for loop syntax has changed to work with the Iterator trait.copy is no longer a keyword. It has been replaced by the Clone trait.debug! macro if it is passed --cfg ndebugmod foo;, rustc will now look for foo.rs, then foo/mod.rs, and will generate an error when both are present.std::c_str module provides new mechanisms for converting to C strings.extern "C" fn instead of `*u8'.#[fixed_stack_segment] attribute.externfn! macro can be used to declare both a foreign function and a #[fixed_stack_segment] wrapper at once.pub and priv modifiers on extern blocks are no longer parsed.unsafe is no longer allowed on extern fns - they are all unsafe.priv is disallowed everywhere except for struct fields and enum variants.&T (besides &'static T) is no longer allowed in @T.ref bindings in irrefutable patterns work correctly now.char is now prevented from containing invalid code points.bool is no longer allowed.\0 is now accepted as an escape in chars and strings.yield is a reserved keyword.typeof is a reserved keyword.extern mod foo = "url";.enum E { V = 0u }static foo: [u8, .. 100]: [0, .. 100];.static foo: Foo = Foo { a: 5, .. bar };.cfg! can be used to conditionally execute code based on the crate configuration, similarly to #[cfg(...)].unnecessary_qualification lint detects unneeded module prefixes (default: allow).std::unstable::simd.format! implements a completely new, extensible, and higher-performance string formatting system. It will replace fmt!.print! and println! write formatted strings (using the format! extension) to stdout.write! and writeln! write formatted strings (using the format! extension) to the new Writers in std::rt::io.#[link_section = "..."].proto! syntax extension for defining bounded message protocols was removed.macro_rules! is hygienic for let declarations.#[export_name] attribute specifies the name of a symbol.unreachable! can be used to indicate unreachable code, and fails if executed.Libraries
rt::io, based on the new runtime.range function was added to the prelude, replacing uint::range and friends.range_rev no longer exists. Since range is an iterator it can be reversed with range(lo, hi).invert().chain method on option renamed to and_then; unwrap_or_default renamed to unwrap_or.iterator module was renamed to iter.checked_add, checked_sub, and checked_mul operations for detecting overflow.str, vec, option, result` were renamed for consistency.to_foo for copying, into_foo for moving, as_foo for temporary and cheap casts.CString type in c_str provides new ways to convert to and from C strings.DoubleEndedIterator can yield elements in two directions.mut_split method on vectors partitions an &mut [T] into two splices.str::from_bytes renamed to str::from_utf8.pop_opt and shift_opt methods added to vectors.swap_unwrap method of Option renamed to take_unwrap.SharedPort to comm.Eq has a default method for ne; only eq is required in implementations.Ord has default methods for le, gt and ge; only lt is required in implementations.is_utf8 performance is improved, impacting many string functions.os::MemoryMap provides cross-platform mmap.ptr::offset is now unsafe, but also more optimized. Offsets that are not ‘in-bounds’ are considered undefined.vec removed in favor of methods.FromIterator so can be created by the collect method.unstable::atomics.comm::PortSet removed.Set and Map traits have been moved into the MutableSet and MutableMap traits. Container::is_empty, Map::contains_key, MutableMap::insert, and MutableMap::remove have default implementations.from_str functions were removed in favor of a generic from_str which is available in the prelude.util::unreachable removed in favor of the unreachable! macro.dlist, the doubly-linked list was modernized.hex module with ToHex and FromHex traits.glob module, replacing std::os::glob.rope was removed.deque was renamed to ringbuf. RingBuf implements Deque.net, and timer were removed. The experimental replacements are std::rt::io::net and std::rt::io::timer.SmallIntMap.Bitv and BitvSet.SmallIntSet removed. Use BitvSet.semver updated to SemVer 2.0.0.term handles more terminals correctly.dbg module removed.par module removed.future was cleaned up, with some method renames.getopts were converted to methods.Other
-Z debug-info) is greatly improved.--target-cpu to compile to a specific CPU architecture, similarly to gcc's --march flag.--test now support the -h and --help flags.rustdoc command.~2000 changes, numerous bugfixes
Language
impls no longer accept a visibility qualifier. Put them on methods instead.self parameter no longer implicitly means &'self self, and can be explicitly marked with a lifetime.+=, etc.) have been temporarily removed due to bugs.for loop protocol now requires for-iterators to return bool so they compose better.Durable trait is replaced with the 'static bounds.#[packed] attribute have byte alignment and no padding between fields.Copy must now be copied explicitly with the copy keyword.Option<~T> is now represented as a nullable pointer.@mut does dynamic borrow checks correctly.main function is only detected at the topmost level of the crate. The #[main] attribute is still valid anywhere.#[no_send] attribute makes a type that would otherwise be Send, not.#[no_freeze] attribute makes a type that would otherwise be Freeze, not.RUST_MAX_STACK environment variable (default: 1GB).vecs_implicitly_copyable lint mode has been removed. Vectors are never implicitly copyable.#[static_assert] makes compile-time assertions about static bools.use mod statement no longer exists.Syntax extensions
fail! and assert! accept ~str, &'static str or fmt!-style argument list.Encodable, Decodable, Ord, TotalOrd, TotalEq, DeepClone, Rand, Zero and ToStr can all be automatically derived with #[deriving(...)].bytes! macro returns a vector of bytes for string, u8, char, and unsuffixed integer literals.Libraries
core crate was renamed to std.std crate was renamed to extra.iterator module for external iterator objects.Iterator.any, all. removed.finalize method of Drop renamed to drop.drop method now takes &mut self instead of &self.print, println, FromStr, ApproxEq, Equiv, Iterator, IteratorUtil, many numeric traits, many tuple traits.Fractional, Real, RealExt, Integer, Ratio, Algebraic, Trigonometric, Exponential, Primitive.(0, 1, 2).n2() or (0, 1, 2).n2_ref().Clone.path type renamed to Path.mut module and Mut type removed.vec, str. In the future methods will also work as functions.reinterpret_cast removed. Use transmute.std::ascii.Rand is implemented for ~/@.run module for spawning processes overhauled.unstable::atomic.Zero.LinearMap and LinearSet renamed to HashMap and HashSet.ptr to borrow.os::mkdir_recursive.os::glob function performs filesystems globs.FuzzyEq renamed to ApproxEq.Map now defines pop and swap methods.Cell constructors converted to static methods.rc module adds the reference counted pointers, Rc and RcMut.flate module moved from std to extra.fileinput module for iterating over a series of files.Complex number type and complex module.Rational number type and rational module.BigInt, BigUint implement numeric and comparison traits.term uses terminfo now, is more correct.arc functions converted to methods.Tooling
unused_variables lint mode for unused variables (default: warn).unused_unsafe lint mode for detecting unnecessary unsafe blocks (default: warn).unused_mut lint mode for identifying unused mut qualifiers (default: warn).dead_assignment lint mode for unread variables (default: warn).unnecessary_allocation lint mode detects some heap allocations that are immediately borrowed so could be written without allocating (default: warn).missing_doc lint mode (default: allow).unreachable_code lint mode (default: warn).rusti command has been rewritten and a number of bugs addressed.--link-args flag to pass arguments to the linker.-Z print-link-args flag for debugging linkage.-g will make the binary record information about dynamic borrowcheck failures for debugging.~2100 changes, numerous bugfixes
Syntax changes
Selfself parameter in trait and impl methods must now be explicitly named (for example: fn f(&self) { }). Implicit self is deprecated.static keyword and instead are distinguished by the lack of a self parameterDurable trait with the 'static lifetimesuper is a keyword, and may be prefixed to paths+ instead of whitespaceimpl Trait for Type instead of impl Type: Trait&'l foo instead of &l/fooexport keyword has finally been removedmove keyword has been removed (see “Semantic changes”)[mut T], has been removed. Use &mut [T], etc.mut is no longer valid in ~mut T. Use inherited mutabilityfail is no longer a keyword. Use fail!()assert is no longer a keyword. Use assert!()log is no longer a keyword. use debug!, etc.(T,)mut. Use inherited mutability, @mut T, core::mut or core::cellextern mod { ... } is no longer valid syntax for foreign function modules. Use extern blocks: extern { ... }const renamed to static to correspond to lifetime name, and make room for future static mut unsafe mutable globals.#[deriving_eq] with #[deriving(Eq)], etc.Clone implementations can be automatically generated with #[deriving(Clone)]@foo as @Bar instead of foo as Bar.[int, .. 3] instead of [int * 3].[int, .. GL_BUFFER_SIZE - 2])Semantic changes
move keyworduse statements may no longer be “chained” - they cannot import identifiers imported by previous use statementsuse statements are crate relative, importing from the “top” of the crate by default. Paths may be prefixed with super:: or self:: to change the search behavior.Libraries
std::bigintcore::oldcomm modulecore::comm modulecore::numvec::slice finally returns a slicedebug! and friends don't require a format string, e.g. debug!(Foo)core::containercore::dvec removed, ~[T] is a drop-in replacementcore::send_map renamed to core::hashmapstd::map removed; replaced with core::hashmapstd::treemap reimplemented as an owned balanced treestd::deque and std::smallintmap reimplemented as owned containerscore::trie added as a fast ordered map for integer keyscore::hashmap, core::trie and std::treemapOrd split into Ord and TotalOrd. Ord is still used to overload the comparison operators, whereas TotalOrd is used by certain container typesOther
rustc --test now supports benchmarks with the #[bench] attribute~900 changes, numerous bugfixes
Syntax changes
<- move operator#fmt extension syntax to fmt![T]/Nquote_tokens!, quote_expr!, etc.a.b() is always parsed as a method call, never as a field projectionEq and IterBytes implementations can be automatically generated with #[deriving_eq] and #[deriving_iter_bytes] respectively.rc filesSemantic changes
& and ~ pointers may point to objectsstruct Foo(Bar, Baz). Will replace newtype enums.move explicitly&T may now be coerced to *Tlet statements as well as function callsuse statements now take crate-relative pathsImproved support for language features
self, &self @self, and ~self all generally work as expectedLibraries
core::conditionstd::sortstd::priority_queuegetopts definitionsstdcore::comm renamed to oldcomm. Still deprecatedrustdoc and cargo are libraries nowMisc
rusti~2000 changes, numerous bugfixes
Syntax
ret became return and alt became matchimport is now use; use is now extern mod`extern mod { ... } is now extern { ... }use mod is the recommended way to import modulespub and priv replace deprecated export listsmatch pattern arms now uses fat arrow (=>)main no longer accepts an args vector; use os::args insteadSemantics
Libraries
std::net::url for representing URLscore::send_mapConcurrency
core::pipesstd::arc, an atomically reference counted, immutable, shared memory typestd::sync, various exotic synchronization tools based on arcs and pipesOther
~1900 changes, numerous bugfixes
New coding conveniences
Semantic cleanup
Experimental new language features
Type reflection
Removal of various obsolete features
Keywords: ‘be’, ‘prove’, ‘syntax’, ‘note’, ‘mutable’, ‘bind’, ‘crust’, ‘native’ (now ‘extern’), ‘cont’ (now ‘again’)
Constructs: do-while loops (‘do’ repurposed), fn binding, resources (replaced by destructors)
Compiler reorganization
New library code
Tool improvements
1500 changes, numerous bugfixes
New docs and doc tooling
New port: FreeBSD x86_64
Compilation model enhancements
Scheduling, stack and threading fixes
Experimental new language features
Various language extensions
New library code
Most language features work, including:
Compiler works with the following configurations:
Cross compilation / multi-target configuration supported.
Preliminary API-documentation and package-management tools included.
Known issues:
Documentation is incomplete.
Performance is below intended target.
Standard library APIs are subject to extensive change, reorganization.
Language-level versioning is not yet operational - future code will break unexpectedly.