{"record":{"id":"faa3e8ca525e2b27","repo":"pola-rs/polars","slug":"activate-feature","errorCode":null,"errorMessage":"activate '{}' feature","messagePattern":"activate '(.+?)' feature","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/polars-error/src/lib.rs","lineNumber":677,"sourceCode":"}\n\n#[inline]\n#[cold]\n#[must_use]\npub fn to_compute_err(err: impl Display) -> PolarsError {\n    PolarsError::ComputeError(err.to_string().into())\n}\n\n#[macro_export]\nmacro_rules! feature_gated {\n    ($($feature:literal);*, $content:expr) => {{\n        #[cfg(all($(feature = $feature),*))]\n        {\n            $content\n        }\n        #[cfg(not(all($(feature = $feature),*)))]\n        {\n            panic!(\"activate '{}' feature\", concat!($($feature, \", \"),*))\n        }\n    }};\n}\n\n// Not public, referenced by macros only.\n#[doc(hidden)]\npub mod __private {\n    #[doc(hidden)]\n    #[inline]\n    #[cold]\n    #[must_use]\n    pub const fn must_use(error: crate::PolarsError) -> crate::PolarsError {\n        error\n    }\n\n    pub const fn has_brace(s: &str) -> bool {\n        let bytes = s.as_bytes();\n        let mut i: usize = 0;","sourceCodeStart":659,"sourceCodeEnd":695,"githubUrl":"https://github.com/pola-rs/polars/blob/9b5d73fd00236295624374b075d16b1fe6ec6df9/crates/polars-error/src/lib.rs#L659-L695","documentation":"feature_gated! macro panic arm: the guarded code requires cargo features that are not enabled in this build (the macro lists them in the message). Rebuild the crate with those features enabled to use the functionality.","triggerScenarios":"This panic/expect fires when execution reaches an unguarded state described by: \"activate '{}' feature\". Typical triggers: unsupported dtype or feature-gated code path reached at runtime, invalid user input or environment variable value, calling API methods in the wrong order or on mismatched types, or data (lengths, offsets, ranges) violating the function's preconditions.","commonSituations":"Encountered when input data or configuration does not meet the preconditions of the throwing code path (\"activate '{}' feature\"). Common cases: missing Cargo feature flags, mismatched dtypes/lengths between arrays or series, out-of-range temporal values, malformed environment variables, or operations on unsupported/complex nested types.","solutions":["Enable the cargo feature named in the error message.","Add the feature to the polars dependency in Cargo.toml, e.g. `polars = { version = \"...\", features = [\"<feature>\"] }`."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9b5d73fd00236295624374b075d16b1fe6ec6df9","analyzedAt":"2026-08-19T12:15:06.350Z","contentChangedAt":"2026-08-19T12:15:06.350Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}