luaur_analysis/records/
internal_compiler_error.rs1use luaur_ast::records::location::Location;
2
3#[derive(Debug, Clone)]
4pub struct InternalCompilerError {
5 pub message: alloc::string::String,
6 pub module_name: Option<alloc::string::String>,
7 pub location: Option<Location>,
8}
9
10unsafe impl Send for InternalCompilerError {}
11unsafe impl Sync for InternalCompilerError {}
12
13#[cfg(feature = "std")]
14impl std::error::Error for InternalCompilerError {}
15
16impl core::fmt::Display for InternalCompilerError {
17 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
18 write!(f, "{}", self.message)
19 }
20}