-
Notifications
You must be signed in to change notification settings - Fork 380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
INSP: attach module without a parent to a parent module in AttachFileToModuleFix #5766
Merged
bors
merged 1 commit into
intellij-rust:master
from
Kobzol:insp-attach-mod-to-parent-mod
Jul 29, 2020
Merged
INSP: attach module without a parent to a parent module in AttachFileToModuleFix #5766
bors
merged 1 commit into
intellij-rust:master
from
Kobzol:insp-attach-mod-to-parent-mod
Jul 29, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mchernyavsky
approved these changes
Jul 28, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
bors r+
bors bot
added a commit
that referenced
this pull request
Jul 28, 2020
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>
|
Build failed (retrying...):
|
bors bot
added a commit
that referenced
this pull request
Jul 29, 2020
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 ``` Co-authored-by: Jakub Beránek <berykubik@gmail.com>
|
Build failed (retrying...):
|
|
Build succeeded: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#5490 added a quick fix to attach a file to a nearby module. However, for
mod.rsfiles it offered only crate root files (lib.rs,main.rs) and not parent modules. So in this case:The quick fix wasn't offered at
/*caret*/.After this PR, the quick fix is offered and the example code is transformed into this: