Skip to content

D187: represent a borrowed return's origins as a list, not a first slot plus returns_borrow_from2 #3022

Done

Description

@ehartford

D187 (#2965) landed returns borrow T from params N, M as a second scalar field, ForeignContract.returns_borrow_from2 (with FacadeCallEffect.borrow_param2 and the CiIR symbol's borrow_from2), beside returns_borrow_from. The spec clause names exactly two parameters, so the representation is not wrong, but it is not the honest one: an origin set is a list, and every reader of the first origin (about forty sites across SemaFacade.w, AnalysisContract.w, CiFacadeDraft.w and CiContracts.w) should handle the set rather than a first slot plus an optional second.

The principled shape: returns_borrow_from: List[i32], the first entry the host for presentation; the declared summaries, the contract rows, the engine verdict borrow:N,M and fd_borrow_union already treat it as a set capped at two. A later ruling admitting three origins would then be a cap change, not a third field.

Activity

  1. ehartford commented on Nov 18, 2026

    @ehartford
    ContributorAuthor

    Sequencing note: this touches about forty sites in SemaFacade.w, AnalysisContract.w and the drafter, the same files two unmerged branches edit (#3127's domain writers and #3178's bare callback). It goes after those land, as its own PR, so the refactor is not rebased across ownership changes.

  2. added
    blocked
    on Nov 18, 2026
  3. removed
    blocked
    on Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions