David Tolnay
David Tolnay
- RFC: https://github.com/rust-lang/rfcs/pull/3680 - Tracking issue: https://github.com/rust-lang/rust/issues/132290 - Feature gate: `#![feature(ergonomic_clones)]` ```rust f(obj.use); thread::spawn(use || f(obj)); task::spawn(async use { f(obj).await }); ```
- RFC: https://github.com/rust-lang/rfcs/pull/3637 - Tracking issue: https://github.com/rust-lang/rust/issues/129967 - Feature gate: `#![feature(guard_patterns)]` ```rust match user.subscription_plan() { (Plan::Regular if user.credit() >= 100) | (Plan::Premium if user.credit() >= 80) => {...} } ```
- RFC: https://github.com/rust-lang/rfcs/pull/3458 - Tracking issue: https://github.com/rust-lang/rust/issues/132922 - Feature gate: `#![feature(unsafe_fields)]` ```rust struct Foo { unsafe field: (), } enum Bar { Variant { unsafe field: () }, } union...
- Tracking issue: https://github.com/rust-lang/rust/issues/130516 - Feature gate: `#![feature(unsafe_binders)]` ```rust fn foo() -> unsafe
- RFC: https://github.com/rust-lang/rfcs/pull/3681 - Tracking issue: https://github.com/rust-lang/rust/issues/132162 - Feature gate: `#![feature(default_field_values)]` ```rust #[derive(Default)] struct Pet { name: Option, age: i128 = 42, // ^^^^ } ```
- Tracking issue: https://github.com/rust-lang/rust/issues/130494 - Feature gate: `#![feature(pin_ergonomics)]` https://github.com/rust-lang/rust/blob/be01dabfefd2daa4574b974f571c7852085d60cb/tests/ui/async-await/pin-sugar.rs ```rust #![feature(pin_ergonomics)] trait Trait { fn pinned_mut(self: &pin mut Self); fn pinned_const(self: &pin const Self); } ```
- Tracking issue: https://github.com/rust-lang/rust/issues/67264 - Feature gate: `#![feature(half_open_range_patterns_in_slices)]` https://github.com/rust-lang/rust/blob/be01dabfefd2daa4574b974f571c7852085d60cb/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.rs#L42C9-L42C25 ```rust match x { &[1..] => {} _ => {} } ``` Syn currently rejects this syntax. ```console error: range pattern...
Closes https://github.com/dtolnay/clang-ast/issues/37.
> Submitted by email from @zefr0x When using `anyhow::Result` in the main function, user input can be printed unintentionally via an error's `core::fmt::Display` implementation when the application exits, it might...
As observed in https://github.com/dtolnay/cxx/issues/441#issuecomment-725204700: ```rust #[cxx::bridge] mod ffi { #[namespace = "shared"] struct Color { r: u8, g: u8, b: u8, } #[namespace = "rust_part"] extern "Rust" { fn is_white(self:...