about summary refs log tree commit diff
path: root/tests/ui/unsafe-binders
AgeCommit message (Collapse)AuthorLines
2025-07-25Mention type that could be `Clone` but isn't in more casesEsteban Küber-0/+9
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-05-30Fix spans for unsafe bindersMatthew Jasper-0/+110
2025-05-28Handle e2021 precise capturing of unsafe binderMichael Goulet-0/+3
2025-05-27Rollup merge of #141433 - compiler-errors:unsafe-binder-captures, r=oli-obk许杰友 Jieyou Xu (Joe)-0/+21
Properly analyze captures from unsafe binders We need to represent the unsafe binder unwrap as an adjustment in HIR. Pretty straightforward b/c we already represent it as a projection elem in MIR. Fixes #141418 Fixes #141417 r? oli-obk
2025-05-23Properly analyze captures from unsafe bindersMichael Goulet-0/+21
2025-05-23Dont walk into unsafe binders when emiting error for non-structural type matchMichael Goulet-0/+30
2025-04-08UI tests: add missing diagnostic kinds where possibleVadim Petrochenkov-1/+1
2025-03-03Fix pretty printing of unsafe bindersMichael Goulet-0/+43
2025-02-28Fix sized constraint for unsafe binderMichael Goulet-0/+29
2025-02-13Use BikeshedGuaranteedNotDrop in unsafe binder type WF tooMichael Goulet-79/+38
2025-01-31Enforce unsafe binders must be Copy (for now)Michael Goulet-39/+74
2025-01-31Implement MIR, CTFE, and codegen for unsafe bindersMichael Goulet-56/+119
2024-12-22Begin to implement type system layer of unsafe bindersMichael Goulet-55/+135
2024-12-12Add testsMichael Goulet-0/+150