Intellij-rust: Simplify boolean expression inspection should not modify PSI

Created on 13 Feb 2017  路  3Comments  路  Source: intellij-rust/intellij-rust

See https://github.com/intellij-rust/intellij-rust/commit/e0962ec008e9ed9f8031ecd3d12ca57be1b20fbb

The problem is that inspection tries to change PSI. I've disabled the inspection by default for now.

This can be hacked around by coping the PSI node, like we do in the intention, but I wonder if this can be done more efficiently, without coping? What if we parametrize the simplification function with the return value, such that it returns Unit in query mode and RsExpr in execute mode?

cc @slavam2605

help wanted

Most helpful comment

:100:0

All 3 comments

:100:0

@matklad Should it be closed?

Indeed!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

marty30 picture marty30  路  3Comments

panstromek picture panstromek  路  3Comments

stonenice picture stonenice  路  3Comments

SomeoneToIgnore picture SomeoneToIgnore  路  3Comments

dmarcuse picture dmarcuse  路  3Comments