Skip to content

Conversation

@TopGunSnake
Copy link
Contributor

Fixes #12790

Original behavior was to insert pub(crate) at the first_child_or_token, which for an item with a comment or attribute macro, would put the visibility marker before the comment or macro, instead of after.

This merge request alters the call to find the node with appropriate SyntaxKind in the children_or_tokens. It also adds a test case to the module to verify the behavior. Test case verifies function, module, records, enum, impl, trait, and type cases.

@TopGunSnake
Copy link
Contributor Author

Need verification that the cases added are sufficient for all known cases to add a pub(crate).

@Veykril
Copy link
Member

Veykril commented Jul 20, 2022

Thanks!
@bors r+

@bors
Copy link
Contributor

bors commented Jul 20, 2022

📌 Commit 6df414f has been approved by Veykril

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Jul 20, 2022

⌛ Testing commit 6df414f with merge 8454413...

@bors
Copy link
Contributor

bors commented Jul 20, 2022

☀️ Test successful - checks-actions
Approved by: Veykril
Pushing 8454413 to master...

@bors bors merged commit 8454413 into rust-lang:master Jul 20, 2022
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.

Extract Module disorganizes doc comments and attribute macros

3 participants