Skip to content

Commit bd69999

Browse files
authored
fix(docs): correct LintContext lifetime in check_full_source_unit example (#12462)
Update early.rs
1 parent 9b13b81 commit bd69999

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/lint/src/linter/early.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ pub trait EarlyLintPass<'ast>: Send + Sync {
5050
///
5151
/// ### Example
5252
/// ```rust,ignore
53-
/// fn check_full_source_unit(&mut self, ctx: &LintContext<'ast>, ast: &'ast ast::SourceUnit<'ast>) {
53+
/// fn check_full_source_unit(&mut self, ctx: &LintContext<'ast, '_>, ast: &'ast ast::SourceUnit<'ast>) {
5454
/// // Check if the lint is enabled before performing expensive work.
5555
/// if ctx.is_lint_enabled(MY_EXPENSIVE_LINT.id) {
5656
/// // ... perform computation and emit diagnostics ...

0 commit comments

Comments
 (0)