willcrichton / flowistry

Flowistry is an IDE plugin for Rust that helps you focus on relevant code.
https://marketplace.visualstudio.com/items?itemName=wcrichton.flowistry
MIT License
1.91k stars 45 forks source link

[PDG] Arguments and returns not correctly connected with external functions in certain cases. #95

Open JustusAdam opened 9 months ago

JustusAdam commented 9 months ago

Here is the code I tried

fn main() -> u32 {
    id(create())
}

// external 
fn create() -> u32;
fn id<T>(t: T) -> T;

I would have expected this to create a PDG return@create -> arg[0]@id -> return@id -> return@main but instead it creates this

Screenshot 2024-02-16 at 3 56 37 PM

The input of id is for some reason not connected to anything, but its parent is connected to its return? This is very strange.