{"record":{"id":"836fa4c13e782884","repo":"slint-ui/slint","slug":"could-not-load","errorCode":null,"errorMessage":"Could not load {}: {}","messagePattern":"Could not load (.+?): (.+?)","errorType":"exception","errorClass":"Diagnostic","httpStatus":null,"severity":"error","filePath":"internal/compiler/diagnostics.rs","lineNumber":204,"sourceCode":"        level: DiagnosticLevel::Error,\n    })?;\n\n    if path.extension().is_some_and(|e| e == \"rs\") {\n        return crate::lexer::extract_rust_macro(string).ok_or_else(|| Diagnostic {\n            message: \"No `slint!` macro\".into(),\n            span: SourceLocation {\n                source_file: Some(SourceFileInner::from_path_only(path.to_owned())),\n                span: Default::default(),\n            },\n            level: DiagnosticLevel::Error,\n        });\n    }\n\n    Ok(string)\n}\n\n#[derive(Debug, Clone, Default)]\npub struct SourceLocation {\n    pub source_file: Option<SourceFile>,\n    pub span: Span,\n}\n\nimpl Spanned for SourceLocation {\n    fn span(&self) -> Span {\n        self.span.clone()\n    }\n\n    fn source_file(&self) -> Option<&SourceFile> {\n        self.source_file.as_ref()\n    }\n}\n\nimpl Spanned for Option<SourceLocation> {\n    fn span(&self) -> crate::diagnostics::Span {\n        self.as_ref().map(|n| n.span()).unwrap_or_default()\n    }","sourceCodeStart":186,"sourceCodeEnd":222,"githubUrl":"https://github.com/slint-ui/slint/blob/3a7e700487dc74d404cad0726378053ab763d4e0/internal/compiler/diagnostics.rs#L186-L222","documentation":"Error \"Could not load {}: {}\" thrown in slint-ui/slint.","triggerScenarios":"Thrown at internal/compiler/diagnostics.rs:204 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check that the file exists and is readable at the reported path.","Fix the underlying I/O error shown in the second message part."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3a7e700487dc74d404cad0726378053ab763d4e0","analyzedAt":"2026-08-19T23:23:16.610Z","contentChangedAt":"2026-08-19T23:23:16.610Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}