Rust is een programmeertaal bedacht door Graydon Hoare en oorspronkelijk ontwikkeld door Mozilla. Het is deels geïnspireerd op de programmeertaal C, maar kent syntactische en semantische verschillen. Het focust op veiligheid en moet moderne computersystemen efficiënter benutten. Het wordt ingezet door onder andere Cloudflare, OVH, Mozilla, Deliveroo, Coursera, AppSignal en Threema. Versie 1.85 is uitgebracht en de releasenotes voor die uitgave kunnen hieronder worden gevonden.
Announcing Rust 1.85.0 and Rust 2024
The Rust team is happy to announce a new version of Rust, 1.85.0. This stabilizes the 2024 edition as well. Rust is a programming language empowering everyone to build reliable and efficient software. If you have a previous version of Rust installed via
rustup
, you can get 1.85.0 with:$ rustup update stable
If you don't have it already, you can get
rustup
from the appropriate page on our website, and check out the detailed release notes for 1.85.0. If you'd like to help us out by testing future releases, you might consider updating locally to use the beta channel (rustup default beta
) or the nightly channel (rustup default nightly
). Please report any bugs you might come across!What's in 1.85.0 stable
Rust 2024We are excited to announce that the Rust 2024 Edition is now stable! Editions are a mechanism for opt-in changes that may otherwise pose a backwards compatibility risk. See the edition guide for details on how this is achieved, and detailed instructions on how to migrate. This is the largest edition we have released. The edition guide contains detailed information about each change, but as a summary, here are all the changes:
LanguageStandard library
- RPIT lifetime capture rules — Changes the default capturing of parameters by
impl Trait
types whenuse<..>
is not present.if let
temporary scope — Changes the scope of temporaries forif let
expressions.- Tail expression temporary scope — Changes the scope of temporaries for the tail expression in a block.
- Match ergonomics reservations — Disallow some pattern combinations to avoid confusion and allow for future improvements.
- Unsafe
extern
blocks —extern
blocks now require theunsafe
keyword.- Unsafe attributes — The
export_name
,link_section
, andno_mangle
attributes must now be marked asunsafe
.unsafe_op_in_unsafe_fn
warning — Theunsafe_op_in_unsafe_fn
lint now warns by default, requiring explicitunsafe {}
blocks inunsafe
functions.- Disallow references to
static mut
— References tostatic mut
items now generate a deny-by-default error.- Never type fallback change — Changes to how the never type
!
coerces, and changes thenever_type_fallback_flowing_into_unsafe
lint level to "deny".- Macro fragment specifiers — The
expr
macro fragment specifier inmacro_rules!
macros now also matchesconst
and_
expressions.- Missing macro fragment specifiers — The
missing_fragment_specifier
lint is now a hard error, rejecting macro meta variables without a fragment specifier kind.gen
keyword — Reserves thegen
keyword in anticipation of adding generator blocks in the future.- Reserved syntax — Reserves
#"foo"#
style strings and##
tokens in anticipation of changing how guarded string literals may be parsed in the future.Cargo
- Changes to the prelude — Adds
Future
andIntoFuture
to the prelude.- Add
IntoIterator
forBox<[T]>
— Changes how iterators work with boxed slices.- Newly unsafe functions —
std::env::set_var
,std::env::remove_var
, andstd::os::unix::process::CommandExt::before_exec
are now unsafe functions.Rustdoc
- Cargo: Rust-version aware resolver — Changes the default dependency resolver behavior to consider the
rust-version
field.- Cargo: Table and key name consistency — Removes some outdated
Cargo.toml
keys.- Cargo: Reject unused inherited default-features — Changes how
default-features = false
works with inherited workspace dependencies.Rustfmt
- Rustdoc combined tests — Doctests are now combined into a single executable, significantly improving performance.
- Rustdoc nested
include!
change — Changes to the relative path behavior of nestedinclude!
files.
- Rustfmt: Style edition — Introduces the concept of "style editions", which allow you to independently control the formatting edition from the Rust edition.
- Rustfmt: Formatting fixes — A large number of fixes to formatting various situations.
- Rustfmt: Raw identifier sorting — Changes to how
r#foo
identifiers are sorted.- Rustfmt: Version sorting — Changes to how identifiers that contain integers are sorted.