Version 1.47.0 (2020-10-08)
Language
Compiler
- Stabilized the
-C control-flow-guardcodegen option, which enables Control Flow Guard for Windows platforms, and is ignored on other platforms. - Upgraded to LLVM 11.
- Added tier 3* support for the
thumbv4t-none-eabitarget. - Upgrade the FreeBSD toolchain to version 11.4
RUST_BACKTRACE's output is now more compact.
* Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support.
Libraries
CStrnow implementsIndex<RangeFrom<usize>>.- Traits in
std/coreare now implemented for arrays of any length, not just those of length less than 33. ops::RangeFullandops::Rangenow implement Default.panic::Locationnow implementsCopy,Clone,Eq,Hash,Ord,PartialEq, andPartialOrd.
Stabilized APIs
Ident::new_rawRange::is_emptyRangeInclusive::is_emptyResult::as_derefResult::as_deref_mutVec::leakpointer::offset_fromf32::TAUf64::TAU
The following previously stable APIs have now been made const.
- The
newmethod for allNonZerointegers. - The
checked_add,checked_sub,checked_mul,checked_neg,checked_shl,checked_shr,saturating_add,saturating_sub, andsaturating_mulmethods for all integers. - The
checked_abs,saturating_abs,saturating_neg, andsignumfor all signed integers. - The
is_ascii_alphabetic,is_ascii_uppercase,is_ascii_lowercase,is_ascii_alphanumeric,is_ascii_digit,is_ascii_hexdigit,is_ascii_punctuation,is_ascii_graphic,is_ascii_whitespace, andis_ascii_controlmethods forcharandu8.
Cargo
build-dependenciesare now built with opt-level 0 by default. You can override this by setting the following in yourCargo.toml.[profile.release.build-override] opt-level = 3cargo-helpwill now display man pages for commands rather just the--helptext.cargo-metadatanow emits atestfield indicating if a target has tests enabled.workspace.default-membersnow respectsworkspace.exclude.cargo-publishwill now use an alternative registry by default if it's the only registry specified inpackage.publish.
Misc
- Added a help button beside Rustdoc's searchbar that explains rustdoc's type based search.
- Added the Ayu theme to rustdoc.
Compatibility Notes
- Bumped the minimum supported Emscripten version to 1.39.20.
- Fixed a regression parsing
{} && falsein tail expressions. - Added changes to how proc-macros are expanded in
macro_rules!that should help to preserve more span information. These changes may cause compilation errors if your macro was unhygenic or didn't correctly handleDelimiter::None. - Moved support for the CloudABI target to tier 3.
linux-gnutargets now require minimum kernel 2.6.32 and glibc 2.11.- Added the
rustc-docscomponent. This allows you to install and read the documentation for the compiler internal APIs. (Currently only available forx86_64-unknown-linux-gnu.)
Internal Only
- Improved default settings for bootstrapping in
x.py. You can read details about this change in the "Changes tox.pydefaults" post on the Inside Rust blog.