Skip to content
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

Support pub impl syntax #31

Merged
merged 1 commit into from
Apr 26, 2021
Merged

Support pub impl syntax #31

merged 1 commit into from
Apr 26, 2021

Conversation

taiki-e
Copy link
Owner

@taiki-e taiki-e commented Apr 26, 2021

This replaces the impl-level visibility syntax introduced in #25 (v0.2.6). It is more natural syntax and compatible with rustfmt.

#[ext(Ext)]
pub impl Type {
    fn method(&self) {}
}
pub impl Type {
^^^

The old impl-level visibility syntax (#[ext(pub)]) will still be supported, but it is deprecated and will be removed in the next major version.

Migration:

- #[ext(pub)]
- impl Type {
+ #[ext]
+ pub impl Type {
    fn method(&self) {}
}

@taiki-e
Copy link
Owner Author

taiki-e commented Apr 26, 2021

FYI @Boscop

@taiki-e
Copy link
Owner Author

taiki-e commented Apr 26, 2021

bors r+

@bors
Copy link
Contributor

bors bot commented Apr 26, 2021

Build succeeded:

@bors bors bot merged commit 4bd33d7 into main Apr 26, 2021
@bors bors bot deleted the vis branch April 26, 2021 20:36
@Boscop
Copy link

Boscop commented Apr 27, 2021

But the way to specify pub before each method will continue to work, right?

@taiki-e
Copy link
Owner Author

taiki-e commented Apr 27, 2021

Yeah. There are currently no plans to deprecate or remove associated-item-level visibility (pub before fn/type/const).

@taiki-e
Copy link
Owner Author

taiki-e commented Jun 23, 2021

Released in v0.2.8.

@taiki-e taiki-e mentioned this pull request Oct 23, 2021
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.

2 participants