{"record":{"id":"87b465082fb589cc","repo":"rust-lang/rust-clippy","slug":"error-reading-e","errorCode":null,"errorMessage":"error reading `{}`: {e}","messagePattern":"error reading `(.+?)`: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"clippy_config/src/conf.rs","lineNumber":911,"sourceCode":"                    if fs::metadata(loaded_path).is_ok_and(|x| x.is_file()) {\n                        // Warn if `.clippy.toml` and `clippy.toml` exist\n                        sess.dcx().warn(format!(\n                            \"using config file `{}`, `{}` will be ignored\",\n                            loaded_path.display(),\n                            config_path.display(),\n                        ));\n                    }\n                } else {\n                    match sess.source_map().load_file(&config_path) {\n                        Ok(src) => loaded_config = Some((config_path, src)),\n                        Err(e)\n                            if matches!(\n                                e.kind(),\n                                io::ErrorKind::NotFound | io::ErrorKind::IsADirectory | io::ErrorKind::NotADirectory\n                            ) => {},\n                        Err(e) => {\n                            sess.dcx()\n                                .err(format!(\"error reading `{}`: {e}\", config_path.display()));\n                            return None;\n                        },\n                    }\n                }\n            }\n        }\n\n        // Don't mention config files in parent directories.\n        if let Some((_, src)) = loaded_config {\n            return Some(src);\n        }\n\n        // If the current directory has no parent, we're done searching.\n        if !current.pop() {\n            return None;\n        }\n    }\n}","sourceCodeStart":893,"sourceCodeEnd":929,"githubUrl":"https://github.com/rust-lang/rust-clippy/blob/13aece11388703700981f29d9480ffd6409a3192/clippy_config/src/conf.rs#L893-L929","documentation":"Emitted in load_conf_file after a clippy.toml/.clippy.toml was located but could not be read or loaded as a source file. sess.source_map().load_file fails on I/O errors such as unreadable permissions, a path that is not a regular file, or non-UTF-8 content. The {e} placeholder carries the underlying std::io error; when this fires the discovered config file is effectively unusable and clippy proceeds without it.","triggerScenarios":"Thrown at clippy_config/src/conf.rs:911 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check file permissions on the config file and ensure the running user can read it","Confirm the file is a regular UTF-8 encoded file and not a directory or symlink to a missing target","Fix the underlying I/O issue reported by {e} (disk, mount, path length) and rerun clippy","Move or recreate the config file at a readable location and set CLIPPY_CONF_DIR to it"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"13aece11388703700981f29d9480ffd6409a3192","analyzedAt":"2026-09-07T23:08:18.134Z","contentChangedAt":"2026-09-07T23:08:18.134Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}