diff --git a/src/librustc_session/session.rs b/src/librustc_session/session.rs index 3cb8ba4af11..ef09813b6ca 100644 --- a/src/librustc_session/session.rs +++ b/src/librustc_session/session.rs @@ -559,7 +559,7 @@ pub fn crt_static_feature(&self, crate_type: Option) -> bool if found_positive || found_negative { found_positive } else if crate_type == Some(config::CrateType::ProcMacro) - || self.opts.crate_types.contains(&config::CrateType::ProcMacro) + || crate_type == None && self.opts.crate_types.contains(&config::CrateType::ProcMacro) { // FIXME: When crate_type is not available, // we use compiler options to determine the crate_type.