Software-update: Rust 1.85.0
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.
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!
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:
LanguageRPIT lifetime capture rules — Changes the default capturing of parameters by impl Trait types when use<..> is not present.if let temporary scope — Changes the scope of temporaries for if 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 the unsafe keyword.Unsafe attributes — The export_name, link_section, and no_mangle attributes must now be marked as unsafe.unsafe_op_in_unsafe_fn warning — The unsafe_op_in_unsafe_fn lint now warns by default, requiring explicit unsafe {} blocks in unsafe functions.Disallow references to static mut — References to static mut items now generate a deny-by-default error.Never type fallback change — Changes to how the never type ! coerces, and changes the never_type_fallback_flowing_into_unsafe lint level to "deny".Macro fragment specifiers — The expr macro fragment specifier in macro_rules! macros now also matches const 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 the gen 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.
RPIT lifetime capture rules — Changes the default capturing of parameters by impl Trait types when use<..> is not present.if let temporary scope — Changes the scope of temporaries for if 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 the unsafe keyword.Unsafe attributes — The export_name, link_section, and no_mangle attributes must now be marked as unsafe.unsafe_op_in_unsafe_fn warning — The unsafe_op_in_unsafe_fn lint now warns by default, requiring explicit unsafe {} blocks in unsafe functions.Disallow references to static mut — References to static mut items now generate a deny-by-default error.Never type fallback change — Changes to how the never type ! coerces, and changes the never_type_fallback_flowing_into_unsafe lint level to "deny".Macro fragment specifiers — The expr macro fragment specifier in macro_rules! macros now also matches const 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 the gen 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.Standard libraryChanges to the prelude — Adds Future and IntoFuture to the prelude.Add IntoIterator for Box<[T]> — Changes how iterators work with boxed slices.Newly unsafe functions — std::env::set_var, std::env::remove_var, and std::os::unix::process::CommandExt::before_exec are now unsafe functions.
Changes to the prelude — Adds Future and IntoFuture to the prelude.Add IntoIterator for Box<[T]> — Changes how iterators work with boxed slices.Newly unsafe functions — std::env::set_var, std::env::remove_var, and std::os::unix::process::CommandExt::before_exec are now unsafe functions.CargoCargo: 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.
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.RustdocRustdoc combined tests — Doctests are now combined into a single executable, significantly improving performance.Rustdoc nested include! change — Changes to the relative path behavior of nested include! files.
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 nested include! files.RustfmtRustfmt: 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.
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.
Source:
Tweakers.net