-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Lockless LintStore #65193
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
Lockless LintStore #65193
Changes from 1 commit
47a443c
577d442
2121b04
748eccd
b060f3b
e1079c8
68c07db
7fef397
2454512
aa4ee2c
c1abc30
7abb1fa
c4475c7
da56d1d
dab3bd6
b761367
6be0a70
4e8d1b2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -82,6 +82,11 @@ pub struct Config { | |
| pub crate_name: Option<String>, | ||
| pub lint_caps: FxHashMap<lint::LintId, lint::Level>, | ||
|
|
||
| /// This is a callback from the driver that is called when we're registering lints; | ||
| /// it is called during plugin registration when we have the LintStore in a non-shared state. | ||
| /// | ||
| /// Note that if you find a Some here you probably want to call that function in the new | ||
| /// function being registered. | ||
| pub register_lints: Option<Box<dyn Fn(&Session, &mut lint::LintStore) + Send + Sync>>, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It'd be nice to have a comment here. Something like: Callback that is invoked during lint registration. Use the |
||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,6 +25,7 @@ pub struct Registry<'a> { | |
| /// from the plugin registrar. | ||
| pub sess: &'a Session, | ||
|
|
||
| /// The `LintStore` allows plugins to register new lints. | ||
| pub lint_store: &'a mut LintStore, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: doc-comment, I think something simple like this would suffice The |
||
|
|
||
| #[doc(hidden)] | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: doc-comment