Skip to content

Migrate fix_visibility assist to SyntaxEditor #21710

Merged
ShoyuVanilla merged 1 commit intorust-lang:masterfrom
SpiZeak:migrate-fix-visibility
Feb 27, 2026
Merged

Migrate fix_visibility assist to SyntaxEditor #21710
ShoyuVanilla merged 1 commit intorust-lang:masterfrom
SpiZeak:migrate-fix-visibility

Conversation

@SpiZeak
Copy link
Copy Markdown
Contributor

@SpiZeak SpiZeak commented Feb 25, 2026

Changes made in conjunction with Copilot "Ask" agent.

part of #15710 and #18285

running 14 tests
test handlers::fix_visibility::tests::replaces_pub_crate_with_pub ... ok
test handlers::fix_visibility::tests::fix_visibility_of_reexport ... ok
test handlers::fix_visibility::tests::adds_pub_when_target_is_in_another_crate ... ok
test handlers::fix_visibility::tests::fix_visibility_of_inline_module_in_other_file ... ok
test handlers::fix_visibility::tests::fix_visibility_of_adt_in_other_file ... ok
test handlers::fix_visibility::tests::fix_visibility_of_module_declaration_in_other_file ... ok
test handlers::fix_visibility::tests::fix_visibility_of_static ... ok
test handlers::fix_visibility::tests::fix_visibility_of_type_alias ... ok
test handlers::fix_visibility::tests::fix_visibility_of_const ... ok
test handlers::fix_visibility::tests::fix_visibility_of_fn ... ok
test handlers::fix_visibility::tests::fix_visibility_of_trait ... ok
test handlers::fix_visibility::tests::fix_visibility_of_enum_variant_field ... ok
test handlers::fix_visibility::tests::fix_visibility_of_module ... ok
test handlers::fix_visibility::tests::fix_visibility_of_adt_in_submodule ... ok

test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 2675 filtered out; finished in 0.03s

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 25, 2026
@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@rustbot rustbot added has-merge-commits S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 26, 2026
@SpiZeak SpiZeak force-pushed the migrate-fix-visibility branch from 6e68d07 to ebe5dfe Compare February 26, 2026 09:05
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Feb 26, 2026

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@rustbot rustbot removed has-merge-commits S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 26, 2026
Comment thread crates/syntax/src/ast/syntax_factory/constructors.rs Outdated
Comment thread crates/syntax/src/ast/syntax_factory/constructors.rs Outdated
Comment thread crates/ide-assists/src/handlers/fix_visibility.rs Outdated
Comment thread crates/ide-assists/src/handlers/fix_visibility.rs Outdated
@SpiZeak
Copy link
Copy Markdown
Contributor Author

SpiZeak commented Feb 26, 2026

Applied change suggestions, please take another look.

@SpiZeak SpiZeak requested a review from Shourya742 February 26, 2026 11:22
Copy link
Copy Markdown
Member

@Shourya742 Shourya742 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more suggestion

View changes since this review

editor.add_annotation(missing_visibility.syntax(), builder.make_tabstop_before(cap));
}

editor.add_mappings(make.finish_with_mappings());
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be removed

@SpiZeak SpiZeak requested a review from Shourya742 February 26, 2026 19:14
Copy link
Copy Markdown
Member

@Shourya742 Shourya742 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ShoyuVanilla
Copy link
Copy Markdown
Member

Looks good to me as well. Could you squash the commits into a single one?

@SpiZeak SpiZeak force-pushed the migrate-fix-visibility branch from 3b2c50b to dd8e886 Compare February 27, 2026 07:36
@SpiZeak
Copy link
Copy Markdown
Contributor Author

SpiZeak commented Feb 27, 2026

Squashed into a single commit and verified CI. Ready for merge! Thanks again for the reviews.

Copy link
Copy Markdown
Member

@ShoyuVanilla ShoyuVanilla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ShoyuVanilla ShoyuVanilla added this pull request to the merge queue Feb 27, 2026
Merged via the queue into rust-lang:master with commit 8494a8b Feb 27, 2026
16 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 27, 2026
@SpiZeak SpiZeak deleted the migrate-fix-visibility branch February 27, 2026 09:52
@SpiZeak SpiZeak changed the title Migrate fix_visibility assist to use SyntaxEditor Migrate fix_visibility assist to SyntaxEditor Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants