Skip to content

Function shape edge being removed too early for call with nested refs #151

@zgrannan

Description

@zgrannan

For the following Rust code:

fn maybe_switch<'a, 'b>(c: bool, x: &'a mut &'b mut String, y: &'a mut &'b mut String) {
  if c {
    std::mem::swap(x, y)
  }
}

fn main(){
   let mut rx = &mut String::from("boom"); 
   let mut ry = &mut String::from("baz");
   maybe_switch(true, &mut rx, &mut ry, );
   println!("{rx} {ry}")
}

At the end of bb3[0], the edges to the lifetime projections of ry are incorrect. The edges for the function shape itself (at the beginning of bb3[0] appear to be created correctly).

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