about summary refs log tree commit diff
path: root/tests/ui/pattern/deref-patterns/closure_capture.rs
AgeCommit message (Collapse)AuthorLines
2025-05-06let deref patterns participate in usefulness/exhaustivenessdianne-4/+4
This does not yet handle the case of mixed deref patterns with normal constructors; it'll ICE in `Constructor::is_covered_by`. That'll be fixed in a later commit.
2025-04-24lower deref patterns on boxes using built-in derefsdianne-0/+18
This allows deref patterns to move out of boxes. Implementation-wise, I've opted to put the information of whether a deref pattern uses a built-in deref or a method call in the THIR. It'd be a bit less code to check `.is_box()` everywhere, but I think this way feels more robust (and we don't have a `mutability` field in the THIR that we ignore when the smart pointer's a box). I'm not sure about the naming (or using `ByRef`), though.
2025-04-24move existing tests away from using boxesdianne-4/+6
Since deref patterns on boxes will be lowered differently, I'll be making a separate test file for them. This makes sure we're still testing the generic `Deref(Mut)::deref(_mut)`-based lowering.
2025-04-16upvar inference for implicit deref patternsdianne-0/+27
2024-04-20Address closure-related reviewNadrieril-0/+21