

fix: Extract Function produces duplicate fn names by DorianListens · Pull Reques...
source link: https://github.com/rust-lang/rust-analyzer/pull/12662
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

This change fixes #10037, in more or less the most naive fashion
possible.
We continue to start with the hardcoded default of "fun_name", and now append a
counter to the end of it if that name is already in scope.
In the future, we can probably apply more heuristics here to wind up with more
useful names by default, but for now this resolves the immediate problem.
Recommend
-
15
2-Acre Vertical Farm Run By AI And Robots Out-Produces 720-Acre Flat Farm by Andrea D. SteffenDecember 23, 2020 Share
-
9
Study: Social media contributes to a more diverse news diet — wait, what?! Are filter bubbles a myth?...
-
3
July 20, 2021 ...
-
5
String.slice! produces a strange result advertisements The following produces a strange result for slice! (unless I have made a mistake)....
-
6
Conversation Copy link ...
-
6
-
5
Improving “Extract Function” in Rust Analyzer Tech Over the last several weeks, I’ve made a series of...
-
4
Duplicate column names A former colleague from my MySQL AB days asked me aboutSELECT pk, SUM(amount) AS pk FROM t ORDER BY pk;should the duplicate use of the name PK be illegal? My reply...
-
9
Adding table names to error for duplicate column names Apr 18, 2023 •
-
9
Entra ID Managed Identities and Duplicate Names – The SQL Herald Skip to content
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK