For example, in the program
import option.{map as m}
// ^^^ A ^ B
fn main() {
let _ = option.map(option.Some(Nil), fn(_) { todo })
// ^^^ C
let _ = m(option.Some(Nil), fn(_) { todo })
// ^ D
}
Moving the cursor over position C and triggering go to references will show positions A, C, and D. However, doing the same over position D will fail. At the very least, it should have the same behavior as triggering over position C. In my opinion, it would make sense for triggering over either to highlight all of A through D, although I can see either way.
Interestingly, this seems to work fine for types and type variants, although not for functions or constants.
For example, in the program
Moving the cursor over position C and triggering go to references will show positions A, C, and D. However, doing the same over position D will fail. At the very least, it should have the same behavior as triggering over position C. In my opinion, it would make sense for triggering over either to highlight all of A through D, although I can see either way.
Interestingly, this seems to work fine for types and type variants, although not for functions or constants.