The Rust team is pleased to announce the release of a new version - 1.53.0. Rust is a programming language that allows anyone to create reliable and efficient software.
If you installed a previous version of Rust using tools rustup
, then to upgrade to version 1.53.0, you just need to run the following command:
rustup update stable
If you don't already have it rustup
, you can install it from the appropriate page on our website, as well as view the detailed release notes on GitHub.
What was stabilized in 1.53.0
This release contains several new features for the language and even more for the standard library, including the long-awaited implementation IntoIterator
for arrays. See the detailed release notes for other changes not covered in this announcement.
IntoIterator
for arrays
This is the first Rust release in which arrays implement a trait IntoIterator
. Now you can iterate through the array by value:
for i in [1, 2, 3] {
..
}
Previously, this was only possible by reference, using &[1, 2, 3]
or [1, 2, 3].iter()
.
Similarly, you can now pass an array to methods that expect T: IntoIterator
:
let set = BTreeSet::from_iter([1, 2, 3]);
for (a, b) in some_iterator.chain([1]).zip([1, 2, 3]) {
..
}
- . IntoIterator
โ array.into_iter()
, (&array).into_iter()
.
, IntoIterator
. , , array.into_iter()
(&array).into_iter()
, . .into_iter()
, , for e in [1, 2, 3]
, iter.zip([1, 2, 3])
IntoIterator::into_iter([1, 2, 3])
, .
.into_iter()
, Rust 2021, . โ .
""
|
, . Some(1 | 2)
Some(1) | Some(2)
.
match result {
Ok(Some(1 | 2)) => { .. }
Err(MyError { kind: FileNotFound | PermissionDenied, .. }) => { .. }
_ => { .. }
}
Unicode-
-ASCII . Unicode, UAX #31. โ .
:
const BLร
HAJ: &str = "";
struct ไบบ {
ๅๅญ: String,
}
let ฮฑ = 1;
. , , , :
warning: identifier pair considered confusable between `๏ฝ` and `s`
HEAD- Cargo
Cargo , HEAD
- git- master
. , branch = "main"
git-, main
.
1.52.1, Rust. beta nightly. 1.53.0 1.52.1.
API
:
array::from_ref
array::from_mut
AtomicBool::fetch_update
AtomicPtr::fetch_update
BTreeSet::retain
BTreeMap::retain
BufReader::seek_relative
cmp::min_by
cmp::min_by_key
cmp::max_by
cmp::max_by_key
DebugStruct::finish_non_exhaustive
Duration::ZERO
Duration::MAX
Duration::is_zero
Duration::saturating_add
Duration::saturating_sub
Duration::saturating_mul
f32::is_subnormal
f64::is_subnormal
IntoIterator for array
{integer}::BITS
io::Error::Unsupported
NonZero*::leading_zeros
NonZero*::trailing_zeros
Option::insert
Ordering::is_eq
Ordering::is_ne
Ordering::is_lt
Ordering::is_gt
Ordering::is_le
Ordering::is_ge
OsStr::make_ascii_lowercase
OsStr::make_ascii_uppercase
OsStr::to_ascii_lowercase
OsStr::to_ascii_uppercase
OsStr::is_ascii
OsStr::eq_ignore_ascii_case
Peekable::peek_mut
Rc::increment_strong_count
Rc::decrement_strong_count
slice::IterMut::as_slice
AsRef<[T]> for slice::IterMut
impl SliceIndex for (Bound<usize>, Bound<usize>)
Vec::extend_from_within
1.53.0
Rust - . , .
OpenCollective.
TelegaOvoshey, blandger, Belanchuk and funkill...