diff --git a/cli/loader/src/lib.rs b/cli/loader/src/lib.rs index 06237dc3..4f423893 100644 --- a/cli/loader/src/lib.rs +++ b/cli/loader/src/lib.rs @@ -11,6 +11,7 @@ use std::{ ffi::{OsStr, OsString}, fs, io::{BufRead, BufReader}, + marker::PhantomData, mem, path::{Path, PathBuf}, process::Command, @@ -18,7 +19,6 @@ use std::{ time::SystemTime, }; -#[cfg(any(feature = "tree-sitter-highlight", feature = "tree-sitter-tags"))] use anyhow::Error; use anyhow::{anyhow, Context, Result}; use etcetera::BaseStrategy as _; @@ -327,6 +327,7 @@ pub struct LanguageConfiguration<'a> { highlight_names: &'a Mutex>, #[cfg(feature = "tree-sitter-highlight")] use_all_highlight_names: bool, + _phantom: PhantomData<&'a ()>, } pub struct Loader { @@ -1214,6 +1215,7 @@ impl Loader { highlight_names: &self.highlight_names, #[cfg(feature = "tree-sitter-highlight")] use_all_highlight_names: self.use_all_highlight_names, + _phantom: PhantomData, }; for file_type in &configuration.file_types { @@ -1283,6 +1285,7 @@ impl Loader { highlight_names: &self.highlight_names, #[cfg(feature = "tree-sitter-highlight")] use_all_highlight_names: self.use_all_highlight_names, + _phantom: PhantomData, }; self.language_configurations.push(unsafe { mem::transmute::, LanguageConfiguration<'static>>(