Jump to conversation
Unresolved conversations (0)
Nice work!

Nice work!

All of your conversations have been resolved.

Resolved conversations (9)
@vlad20012 vlad20012 May 11, 2020
These changes are not needed after using RsImportHelper?
Outdated
...t/ide/inspections/import/AutoImportFix.kt
Kobzol
@vlad20012 vlad20012 May 10, 2020
Not needed now
Outdated
...in/org/rust/lang/core/psi/RsPsiFactory.kt
@vlad20012 vlad20012 May 10, 2020
There is a one corner case where this doesn't work: a module can be declared inside a function: ```rust fn bar() { // <- constant should not be suggested here mod foo { fn foo() { let a = 2+2; } } } ``` but if I declare a constant inside a function `bar`, I can't use it inside module `foo` :shrug:
...t/ide/refactoring/introduceConstant/ui.kt
@vlad20012 vlad20012 May 10, 2020
Maybe "Choose scope to introduce constant" (more close to java's version) ![image](https://user-images.githubusercontent.com/3221931/81499418-3ea5d980-92d4-11ea-95d8-ddaeef8e99ac.png)
Outdated
...t/ide/refactoring/introduceConstant/ui.kt
@vlad20012 vlad20012 May 10, 2020
Well, let's use the usual IntelliJ UI for this for now and drop these comments. Highlight a position with comments is an interesting idea. Something like inlay hints maybe even better :thinking:
Outdated
...t/ide/refactoring/introduceConstant/ui.kt
@vlad20012 vlad20012 May 10, 2020
Looks like ` ?: 0` is impossible, but it can leads to fun bugs if it will become possible somehow in the future. Maybe it's better to fail explicitly `?: error("Impossible because we just created a constant with a name")`
Outdated
...uceConstant/RsIntroduceConstantHandler.kt
@vlad20012 vlad20012 May 10, 2020
```suggestion val (insertedConstent, replaced) = project.runWriteCommandAction { ``` (just to make the code a bit easier to understand)
Outdated
...uceConstant/RsIntroduceConstantHandler.kt
@vlad20012 vlad20012 May 10, 2020
Looks like a wrong message
Outdated
...uceConstant/RsIntroduceConstantHandler.kt
vlad20012 Kobzol
@vlad20012 vlad20012 May 10, 2020
Try to use `RsImportHelper.importElements`
Outdated
...uceConstant/RsIntroduceConstantHandler.kt