Skip to content

Why does stacked borrows treat reference parameters specially? #295

Open
@Storyyeller

Description

@Storyyeller

Why does stacked borrows treat reference parameters specially?

Naively, I would expect fn foo(x: &u8, y: &u8) and fn foo(xy: (&u8, &u8)) to be equivalent, but it appears that only in the former case are the references protected by a CallId. Is there an explanation for why it was decided to do things this way?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-aliasing-modelTopic: Related to the aliasing model (e.g. Stacked/Tree Borrows)C-supportCategory: Supporting a user to solve a concrete problem

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions