You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Some(place) passed where Option[&T] is expected moves the place instead of borrowing it #1627
Expected: h(Some(ctx)) borrows ctx (the parameter type is Option[&Ctx]; a &T demand on a place borrows, §3.8 auto-referencing, D22), or is refused. Actual: it compiles, and the next line is error: use of moved value on ctx — the Some(ctx) against an expected Option[&Ctx] recorded a move of ctx while producing a reference. The same happens for let z: Option[&Ctx] = Some(ctx). Some(&ctx) works.
The stage 12b fixtures spell Some(&ctx); once this is fixed, Some(ctx) is the spelling with no ceremony.
Activity
Facade: `nullable param N` on a paired callback renders `Option[exter…
Facade: `nullable param N` on a paired callback renders `Option[exter…
Facade: `nullable param N` on a paired callback renders `Option[exter…
Modeled C stage 12b: optional callbacks, items valid on the failed st…
Sema/MIR: a place against a `&T` enum payload borrows — `Some(ctx)` f…
Sema/MIR: a place against a `&T` enum payload borrows — `Some(ctx)` f…
Sema/MIR: a place against a `&T` enum payload borrows — `Some(ctx)` f…
Sema/MIR: a place against a `&T` enum payload borrows — `Some(ctx)` f…
MIR: a constructor payload borrows where Sema recorded the borrow, an…
Sema: a nullable facade callback's `Some(...)` userdata is borrowed, …
Sema/MIR: a place against a `&T` enum payload borrows — `Some(ctx)` f…
MIR: a constructor payload borrows where Sema recorded the borrow, an…
Sema: a nullable facade callback's `Some(...)` userdata is borrowed, …
MirValidationTests: the #1627 test fn needs no explicit Unit return (…
Spec-ruled fixes: Some(place) borrows for Option[&T], module globals …