File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -104,10 +104,7 @@ impl<'this> RustcCodegenFlags<'this> {
104
104
} ;
105
105
let flag = flag. as_ref ( ) ;
106
106
107
- fn flag_not_empty_inner < T > (
108
- flag : & str ,
109
- flag_value : Option < T > ,
110
- ) -> Result < Option < T > , Error > {
107
+ fn flag_not_empty_generic < T > ( flag : & str , flag_value : Option < T > ) -> Result < Option < T > , Error > {
111
108
if let Some ( flag_value) = flag_value {
112
109
Ok ( Some ( flag_value) )
113
110
} else {
@@ -117,7 +114,7 @@ impl<'this> RustcCodegenFlags<'this> {
117
114
) )
118
115
}
119
116
}
120
- let flag_not_empty = |flag_value| flag_not_empty_inner ( flag, flag_value) ;
117
+ let flag_not_empty = |flag_value| flag_not_empty_generic ( flag, flag_value) ;
121
118
122
119
match flag {
123
120
// https://doc.rust-lang.org/rustc/codegen-options/index.html#code-model
@@ -163,7 +160,7 @@ impl<'this> RustcCodegenFlags<'this> {
163
160
// https://doc.rust-lang.org/beta/unstable-book/compiler-flags/dwarf-version.html
164
161
// FIXME: Drop the -Z variant and update the doc link once the option is stablized
165
162
"-Zdwarf-version" | "-Cdwarf-version" => {
166
- self . dwarf_version = flag_not_empty ( value. and_then ( arg_to_u32) ) ?;
163
+ self . dwarf_version = flag_not_empty_generic ( flag , value. and_then ( arg_to_u32) ) ?;
167
164
}
168
165
// https://github.com/rust-lang/rust/issues/114903
169
166
// FIXME: Drop the -Z variant and update the doc link once the option is stabilized
You can’t perform that action at this time.
0 commit comments