Adopt let else in more places
This commit is contained in:
parent
b8c56fa8c3
commit
2ef8af6619
132 changed files with 539 additions and 881 deletions
|
@ -369,10 +369,9 @@ impl<'ll> StaticMethods for CodegenCx<'ll, '_> {
|
|||
unsafe {
|
||||
let attrs = self.tcx.codegen_fn_attrs(def_id);
|
||||
|
||||
let (v, alloc) = match codegen_static_initializer(self, def_id) {
|
||||
Ok(v) => v,
|
||||
let Ok((v, alloc)) = codegen_static_initializer(self, def_id) else {
|
||||
// Error has already been reported
|
||||
Err(_) => return,
|
||||
return;
|
||||
};
|
||||
|
||||
let g = self.get_static(def_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue