With Rust 1.72.0, the compiler will remember the name and cfg conditions of those items. Previously, items disabled like this effectively would be invisible to the compiler. The new features in Rust 1.72.0Īnnounced August 24, Rust 1.72.0 lets developers conditionally enable code using the cfg operator, for configuration conditional checks, to provide certain functions only with certain crate features or only on particular platforms. Rust 1.73 also stabilizes a number of APIs. The new methods make common code more concise and avoid running extra initialization code for the default value specified in thread_local! for new threads. LocalKey is the type of thread_local! statics. LocalKey> and LocalKey> now can be directly manipulated with get(), set(), and replace() methods instead of jumping through a with(|inner| …) closure as needed for general LocalKey work. Rust 1.73.0 also features thread local initialization. Also, panic messages produced by assert-eg and assert-ne have been modified, moving the custom message and removing some unnecessary punctuation. This can make panic messages easier to read, the Rust release team said. The output produced by the default panic handler has been altered to put panic messages on their own line instead of wrapping in quotes. Rust 1.73.0, published October 5, brings cleaner panic messages. The release also raises the minimum requirements for Apple platforms to macOS 10.12 Sierra, iOS 10, and tvOS 10. Rust 1.74.0 stabilizes a number of APIs such as core::num::Saturating, std::io::Error::other, and impl_TryFrom for u16. Once that was fixed, it was given time to make sure it was sound. This functionality had an unstable feature gate because its implementation originally did not properly deal with captured lifetimes. This feature gets Rust closer to how the language might be expected to work, the Rust Release Team said. Rust 1.74.0 fixes a situation in which errors were received that “a return type cannot contain a projection or Self that references lifetimes from a parent scope.” The compiler now allows mentioning Self and associated types in opaque return types, such as async fn and -> impl Trait. Use of private registries requires the configuration of a credential provider. This enables private Cargo registries to provide more secure hosting of crates. Registries now optionally can require authentication for all operations, not just publishing. Custom providers can be developed to support arbitrary methods of storing or generating tokens. Built-in providers are included for OS-related secure secret storage on Linux, Windows, and macOS. Credential providers enable configuration of how Cargo gets credentials for a registry. Other Cargo-related capabilities highlighted in Rust 1.74.0 include credential providers and authenticated private registries. Cargo tracks changes to these settings when deciding which crates to rebuild. ![]() These also can be configured in a table, then inherited by workspace = true like other workspace settings. #!#!ĭevelopers now can write those attributes in a package manifest for Cargo to handle: unsafe_code = "forbid" enum_glob_use = "deny"
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |