Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I did this accidentally the other day in Rust:

let x = some_function();

... A bunch of code

let x = some_function();

The values of x are the same. It was just an oversight on my part but wondered if I could set my linter to highlight multiple uses of the same variable name in the same function. Does anyone have any suggestions?



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: