@@ -32,7 +32,7 @@ pub struct ContextSubHost<'a> {
3232 pub ( super ) module_record : Arc < ModuleRecord > ,
3333 /// Information about specific rules that should be disabled or enabled, via comment directives like
3434 /// `eslint-disable` or `eslint-disable-next-line`.
35- pub ( super ) disable_directives : DisableDirectives < ' a > ,
35+ pub ( super ) disable_directives : DisableDirectives ,
3636 // Specific framework options, for example, whether the context is inside `<script setup>` in Vue files.
3737 pub ( super ) framework_options : FrameworkOptions ,
3838 /// The source text offset of the sub host
@@ -93,7 +93,7 @@ impl<'a> ContextSubHost<'a> {
9393 }
9494
9595 /// Shared reference to the [`DisableDirectives`]
96- pub fn disable_directives ( & self ) -> & DisableDirectives < ' a > {
96+ pub fn disable_directives ( & self ) -> & DisableDirectives {
9797 & self . disable_directives
9898 }
9999}
@@ -202,7 +202,7 @@ impl<'a> ContextHost<'a> {
202202 }
203203
204204 /// Shared reference to the [`DisableDirectives`] of the current script block.
205- pub fn disable_directives ( & self ) -> & DisableDirectives < ' a > {
205+ pub fn disable_directives ( & self ) -> & DisableDirectives {
206206 & self . current_sub_host ( ) . disable_directives
207207 }
208208
@@ -309,7 +309,7 @@ impl<'a> ContextHost<'a> {
309309 "Unused eslint-enable directive (no matching eslint-disable directives were found)." ;
310310 for ( rule_name, enable_comment_span) in self . disable_directives ( ) . unused_enable_comments ( ) {
311311 unused_directive_diagnostics. push ( (
312- rule_name. map_or ( Cow :: Borrowed ( message_for_enable) , |name| {
312+ rule_name. as_ref ( ) . map_or ( Cow :: Borrowed ( message_for_enable) , |name| {
313313 Cow :: Owned ( format ! (
314314 "Unused eslint-enable directive (no matching eslint-disable directives were found for {name})."
315315 ) )
0 commit comments