1.47.0
版本发布时间: 2020-10-08 20:42:53
rust-lang/rust最新发布版本:1.82.0(2024-10-18 00:44:34)
Language
Compiler
-
Stabilized the
-C control-flow-guard
codegen 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-eabi
target. - Upgrade the FreeBSD toolchain to version 11.4
-
RUST_BACKTRACE
's output is now more compact.
* Refer to Rust's platform support page for more information on Rust's tiered platform support.
Libraries
-
CStr
now implementsIndex<RangeFrom<usize>>
. -
Traits in
std
/core
are now implemented for arrays of any length, not just those of length less than 33. -
ops::RangeFull
andops::Range
now implement Default. -
panic::Location
now implementsCopy
,Clone
,Eq
,Hash
,Ord
,PartialEq
, andPartialOrd
.
Stabilized APIs
-
Ident::new_raw
-
Range::is_empty
-
RangeInclusive::is_empty
-
Result::as_deref
-
Result::as_deref_mut
-
Vec::leak
-
pointer::offset_from
-
f32::TAU
-
f64::TAU
The following previously stable APIs have now been made const.
-
The
new
method for allNonZero
integers. -
The
checked_add
,checked_sub
,checked_mul
,checked_neg
,checked_shl
,checked_shr
,saturating_add
,saturating_sub
, andsaturating_mul
methods for all integers. -
The
checked_abs
,saturating_abs
,saturating_neg
, andsignum
for 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_control
methods forchar
andu8
.
Cargo
-
build-dependencies
are 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 = 3
-
cargo-help
will now display man pages for commands rather just the--help
text. -
cargo-metadata
now emits atest
field indicating if a target has tests enabled. -
workspace.default-members
now respectsworkspace.exclude
. -
cargo-publish
will 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
{} && false
in 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-gnu
targets now require minimum kernel 2.6.32 and glibc 2.11. -
Added the
rustc-docs
component. 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.py
defaults" post on the Inside Rust blog.