1
Fork 0

Adopt let else in more places

This commit is contained in:
est31 2022-02-19 00:48:49 +01:00
parent b8c56fa8c3
commit 2ef8af6619
132 changed files with 539 additions and 881 deletions

View file

@ -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);