@@ -47,16 +47,16 @@ pub struct Runtime<'l> {
4747}
4848
4949/// Output of `Runtime::process_path`
50- struct ModuleProcessOutput {
50+ struct ModuleProcessOutput < ' alloc_pool > {
5151 /// All paths in `Runtime` are stored as `OsStr`, because `OsStr` hash is faster
5252 /// than `Path` - go checkout their source code.
5353 path : Arc < OsStr > ,
54- processed_module : ProcessedModule ,
54+ processed_module : ProcessedModule < ' alloc_pool > ,
5555}
5656
5757/// A module processed from a path
5858#[ derive( Default ) ]
59- struct ProcessedModule {
59+ struct ProcessedModule < ' alloc_pool > {
6060 /// Module records of source sections, or diagnostics if parsing failed on that section.
6161 ///
6262 /// Modules with special extensions such as .vue could contain multiple source sections (see `PartialLoader::PartialLoader`).
@@ -71,7 +71,7 @@ struct ProcessedModule {
7171 ///
7272 /// Note that `content` is `Some` even if parsing is unsuccessful as long as the source to lint is valid utf-8.
7373 /// It is designed this way to cover the case where some but not all the sections fail to parse.
74- content : Option < ModuleContent > ,
74+ content : Option < ModuleContent < ' alloc_pool > > ,
7575}
7676
7777struct ResolvedModuleRequest {
@@ -86,18 +86,18 @@ struct ResolvedModuleRecord {
8686}
8787
8888self_cell ! {
89- struct ModuleContent {
90- owner: ModuleContentOwner ,
89+ struct ModuleContent < ' alloc_pool> {
90+ owner: ModuleContentOwner < ' alloc_pool> ,
9191 #[ not_covariant]
9292 dependent: SectionContents ,
9393 }
9494}
9595// Safety: dependent borrows from owner. They're safe to be sent together.
96- unsafe impl Send for ModuleContent { }
96+ unsafe impl Send for ModuleContent < ' _ > { }
9797
98- struct ModuleContentOwner {
98+ struct ModuleContentOwner < ' alloc_pool > {
9999 source_text : String ,
100- allocator : AllocatorGuard ,
100+ allocator : AllocatorGuard < ' alloc_pool > ,
101101}
102102
103103/// source text and semantic for each source section. They are in the same order as `ProcessedModule.section_module_records`
@@ -113,13 +113,16 @@ struct SectionContent<'a> {
113113///
114114/// A `ModuleWithContent` is generated for each path in `runtime.paths`. It's basically the same
115115/// as `ProcessedModule`, except `content` is non-Option.
116- struct ModuleToLint {
116+ struct ModuleToLint < ' alloc_pool > {
117117 path : Arc < OsStr > ,
118118 section_module_records : SmallVec < [ Result < Arc < ModuleRecord > , Vec < OxcDiagnostic > > ; 1 ] > ,
119- content : ModuleContent ,
119+ content : ModuleContent < ' alloc_pool > ,
120120}
121- impl ModuleToLint {
122- fn from_processed_module ( path : Arc < OsStr > , processed_module : ProcessedModule ) -> Option < Self > {
121+ impl < ' alloc_pool > ModuleToLint < ' alloc_pool > {
122+ fn from_processed_module (
123+ path : Arc < OsStr > ,
124+ processed_module : ProcessedModule < ' alloc_pool > ,
125+ ) -> Option < Self > {
123126 processed_module. content . map ( |content| Self {
124127 path,
125128 section_module_records : processed_module
0 commit comments