rust-tools.nvim icon indicating copy to clipboard operation
rust-tools.nvim copied to clipboard

Inlay hints is giving wrong hints for recursive functions

Open SeanningTatum opened this issue 1 year ago • 1 comments

Problem

Inlay hints is not giving proper hints for recursive functions

Actual

fn quick_sort(array: &mut Vec<i64>, low: usize, high: usize)  {
        let pivot = partition(array, low, high); => usize
        quick_sort(array, low, pivot.checked_sub(1).unwrap_or(0)); <- (high, default)
        quick_sort(array, pivot + 1, high); <- (low)
}

Expected

fn quick_sort(array: &mut Vec<i64>, low: usize, high: usize)  {
        let pivot = partition(array, low, high); => usize
        quick_sort(array, low, pivot.checked_sub(1).unwrap_or(0)); <- (array, low, high)
        quick_sort(array, pivot + 1, high); <- (array, low, high)
}

Attachments

image

SeanningTatum avatar Sep 02 '23 13:09 SeanningTatum