about summary refs log tree commit diff
path: root/tests/ui/pattern/move-ref-patterns
AgeCommit message (Collapse)AuthorLines
2025-07-25Mention type that could be `Clone` but isn't in more casesEsteban Küber-0/+81
When encountering a moved value of a type that isn't `Clone` because of unmet obligations, but where all the unmet predicates reference crate-local types, mention them and suggest cloning, as we do in other cases already: ``` error[E0507]: cannot move out of `foo`, a captured variable in an `Fn` closure --> f111.rs:14:25 | 13 | fn do_stuff(foo: Option<Foo>) { | --- captured outer variable 14 | require_fn_trait(|| async { | -- ^^^^^ `foo` is moved here | | | captured by this `Fn` closure 15 | if foo.map_or(false, |f| f.foo()) { | --- | | | variable moved due to use in coroutine | move occurs because `foo` has type `Option<Foo>`, which does not implement the `Copy` trait | note: if `Foo` implemented `Clone`, you could clone the value --> f111.rs:4:1 | 4 | struct Foo; | ^^^^^^^^^^ consider implementing `Clone` for this type ... 15 | if foo.map_or(false, |f| f.foo()) { | --- you could clone this value ```
2025-07-05cleaned up some testsKivooeo-11/+20
2025-07-01moved testsKivooeo-0/+36
2024-07-04Better span for "make binding mutable" suggestionEsteban Küber-4/+4
2024-04-25Suggest ref mut for pattern matching assignmentyukang-8/+20
2024-02-16[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives许杰友 Jieyou Xu (Joe)-7/+7
2023-11-24Show number in error message even for one errorNilstrieb-2/+2
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-05-21Rename `drop_ref` lint to `dropping_references`Urgau-2/+2
2023-05-10Adjust tests for new drop and forget lintsUrgau-0/+4
2023-05-05tweak spans for `ref mut` suggestionEzra Shaw-2/+2
2023-01-15Tweak E0597Esteban Küber-0/+2
CC #99430
2023-01-11Move /src/test to /testsAlbert Larsan-0/+1119