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

Added public API sealed in trait_newly_sealed #1160

Merged
merged 2 commits into from
Feb 25, 2025

Conversation

geetanshjuneja
Copy link
Contributor

@geetanshjuneja geetanshjuneja commented Feb 25, 2025

Resolves #1115

Comment on lines +66 to +76
{
"name": String("WIllGainDocHiddenMethodWithoutDefault"),
"path": List([
String("trait_method_added"),
String("WIllGainDocHiddenMethodWithoutDefault"),
]),
"span_begin_line": Uint64(24),
"span_end_line": Uint64(27),
"span_filename": String("src/lib.rs"),
"visibility_limit": String("public"),
},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adding a hidden method also makes the trait sealed

Comment on lines +42 to +52
{
"name": String("WillGainADocHiddenType"),
"path": List([
String("trait_associated_type_added"),
String("WillGainADocHiddenType"),
]),
"span_begin_line": Uint64(51),
"span_end_line": Uint64(56),
"span_filename": String("src/lib.rs"),
"visibility_limit": String("public"),
},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

same reason as above

Comment on lines +18 to +28
{
"name": String("WillGainADocHiddenConst"),
"path": List([
String("trait_associated_const_added"),
String("WillGainADocHiddenConst"),
]),
"span_begin_line": Uint64(46),
"span_end_line": Uint64(51),
"span_filename": String("src/lib.rs"),
"visibility_limit": String("public"),
},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The trait WillGainADocHiddenConst becomes public api sealed due addition of a hidden const. Hence it is newly sealed now and error is raised

Copy link
Owner

@obi1kenobi obi1kenobi left a comment

Choose a reason for hiding this comment

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

In the spirit of mirroring the existing code, I'm adding some explanatory comments to the new test cases to explain what's going on. They make it much easier for me to look back and figure out what we're testing down the line, e.g. if someone reports a bug in our lints.

@obi1kenobi obi1kenobi enabled auto-merge (squash) February 25, 2025 14:57
@obi1kenobi obi1kenobi merged commit f559342 into obi1kenobi:main Feb 25, 2025
33 checks passed
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.

trait_newly_sealed
2 participants