Skip to content

Commit cfff1b4

Browse files
committed
When crate_type is None,check compiler options
1 parent 75e6cfc commit cfff1b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_session/session.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ impl Session {
559559
if found_positive || found_negative {
560560
found_positive
561561
} else if crate_type == Some(config::CrateType::ProcMacro)
562-
|| self.opts.crate_types.contains(&config::CrateType::ProcMacro)
562+
|| crate_type == None && self.opts.crate_types.contains(&config::CrateType::ProcMacro)
563563
{
564564
// FIXME: When crate_type is not available,
565565
// we use compiler options to determine the crate_type.

0 commit comments

Comments
 (0)