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 sealed api in trait_associated_type_added #1151

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lints/trait_associated_type_added.ron
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ SemverQuery(
item {
... on Trait {
visibility_limit @filter(op: "=", value: ["$public"]) @output
unconditionally_sealed @filter(op: "!=", value: ["$true"])
public_api_sealed @filter(op: "!=", value: ["$true"])

importable_path {
path @filter(op: "=", value: ["%path"])
Expand Down
9 changes: 9 additions & 0 deletions test_crates/trait_associated_type_added/new/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,12 @@ pub trait TypeDocHidden {

fn make_me_non_dyn_compatible() -> Self;
}

pub trait PublicAPISealed {
#[doc(hidden)]
type Hidden;

type Bar;

fn make_me_non_dyn_compatible() -> Self;
}
7 changes: 7 additions & 0 deletions test_crates/trait_associated_type_added/old/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,10 @@ pub trait TypeDocHidden {

fn make_me_non_dyn_compatible() -> Self;
}

pub trait PublicAPISealed {
#[doc(hidden)]
type Hidden;

fn make_me_non_dyn_compatible() -> Self;
}
Loading