File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
compiler/rustc_session/src Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -2303,16 +2303,22 @@ fn parse_opt_level(
23032303}
23042304
23052305fn select_debuginfo ( matches : & getopts:: Matches , cg : & CodegenOptions ) -> DebugInfo {
2306- let max_g = matches. opt_positions ( "g" ) . into_iter ( ) . max ( ) ;
2307- let max_c = matches
2306+ let _max_g = matches. opt_positions ( "g" ) . into_iter ( ) . max ( ) ;
2307+ let _max_c = matches
23082308 . opt_strs_pos ( "C" )
23092309 . into_iter ( )
23102310 . flat_map ( |( i, s) | {
23112311 // NB: This can match a string without `=`.
23122312 if let Some ( "debuginfo" ) = s. split ( '=' ) . next ( ) { Some ( i) } else { None }
23132313 } )
23142314 . max ( ) ;
2315- if max_g > max_c { DebugInfo :: Full } else { cg. debuginfo }
2315+ match cg. debuginfo {
2316+ DebugInfo :: None => DebugInfo :: None ,
2317+ DebugInfo :: LineDirectivesOnly => DebugInfo :: LineDirectivesOnly ,
2318+ DebugInfo :: LineTablesOnly => DebugInfo :: LineTablesOnly ,
2319+ DebugInfo :: Limited => DebugInfo :: LineTablesOnly ,
2320+ DebugInfo :: Full => DebugInfo :: LineTablesOnly ,
2321+ }
23162322}
23172323
23182324fn parse_assert_incr_state (
You can’t perform that action at this time.
0 commit comments