File tree 2 files changed +6
-1
lines changed
rustc_codegen_ssa/src/back
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -592,7 +592,7 @@ fn produce_final_output_artifacts(
592
592
. unwrap ( )
593
593
. to_owned ( ) ;
594
594
595
- if crate_output. outputs . contains_key ( & output_type) {
595
+ if crate_output. outputs . contains_explicit_name ( & output_type) {
596
596
// 2) Multiple codegen units, with `--emit foo=some_name`. We have
597
597
// no good solution for this case, so warn the user.
598
598
sess. dcx ( ) . emit_warn ( errors:: IgnoringEmitPath { extension } ) ;
Original file line number Diff line number Diff line change @@ -557,6 +557,11 @@ impl OutputTypes {
557
557
self . 0 . contains_key ( key)
558
558
}
559
559
560
+ /// Returns `true` if user specified a name and not just produced type
561
+ pub fn contains_explicit_name ( & self , key : & OutputType ) -> bool {
562
+ self . 0 . get ( key) . map_or ( false , |f| f. is_some ( ) )
563
+ }
564
+
560
565
pub fn iter ( & self ) -> BTreeMapIter < ' _ , OutputType , Option < OutFileName > > {
561
566
self . 0 . iter ( )
562
567
}
You can’t perform that action at this time.
0 commit comments