Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
5660: COMP: offer only struct fields in struct pat r=mchernyavsky a=Kobzol This PR filters out unnecessary completions offered in struct pats. It also adds `..` to completion, but I'm not sure if that's the right way to do it, so it's in a separate commit. Fixes third part of #4448 5766: INSP: attach module without a parent to a parent module in AttachFileToModuleFix r=mchernyavsky a=Kobzol #5490 added a quick fix to attach a file to a nearby module. However, for `mod.rs` files it offered only crate root files (`lib.rs`, `main.rs`) and not parent modules. So in this case: ```rust //- foo/mod.rs /* nothing to see here */ //- foo/bar/mod.rs /* caret*/ ``` The quick fix wasn't offered at `/*caret*/`. After this PR, the quick fix is offered and the example code is transformed into this: ```rust //- foo/mod.rs mod bar; //- foo/bar/mod.rs ``` 5811: INSP: add support for trait refs in RsWrongTypeArgumentsNumberInspection r=undin a=Kobzol `RsWrongTypeArgumentsNumberInspection` previously did not work for trait refs, for example `dyn Trait` or `impl Trait`. This PR adds support for these cases. TODO: - [x] run `RsRealProjectAnalysisTest` 5816: Refactoring of auto-import related code r=mchernyavsky a=Undin These changes extract auto-import related code from `AutoImportFix` into `org.rust.ide.utils.import` package since this code widely used in different IDE features. Also, this code is split into several separate files As a result, a lot of code doesn't depend on `AutoImportFix` 5819: REF: add unsafe modifier to functions extracted from unsafe functions r=mchernyavsky a=Kobzol This PR adds `unsafe` to functions extracted from `unsafe` functions. Currently the `unsafe` is added unconditionally, should I improve that? The extracted statements would have to be scanned for unsafe operations that are not inside an `unsafe` block. Since pretty much the same code is already in `RsUnsafeExpressionAnnotator`, it should be refactored somehow to share the logic. Fixes: #5814 Co-authored-by: Jakub Beránek <berykubik@gmail.com> Co-authored-by: Arseniy Pendryak <a.pendryak@yandex.ru>
- Loading branch information