1
Fork 0

Implement "&<pat> everywhere"

The original proposal allows reference patterns
with "compatible" mutability, however it's not clear
what that means so for now we require an exact match.

I don't know the type system code well, so if something
seems to not make sense it's probably because I made a
mistake
This commit is contained in:
Jules Bertholet 2024-03-30 12:57:54 -05:00
parent 877d36b192
commit f37a4d55ee
No known key found for this signature in database
GPG key ID: 32034DAFC38C1BFC
11 changed files with 257 additions and 29 deletions

View file

@ -339,6 +339,8 @@ declare_features! (
(incomplete, adt_const_params, "1.56.0", Some(95174)),
/// Allows defining an `#[alloc_error_handler]`.
(unstable, alloc_error_handler, "1.29.0", Some(51540)),
/// Allows `&` and `&mut` patterns to consume match-ergonomics-inserted references.
(incomplete, and_pat_everywhere, "CURRENT_RUSTC_VERSION", Some(123076)),
/// Allows trait methods with arbitrary self types.
(unstable, arbitrary_self_types, "1.23.0", Some(44874)),
/// Allows using `const` operands in inline assembly.