Skip to content

Commit 4d3227f

Browse files
committed
Move variable into condition where it's used
1 parent 250fb72 commit 4d3227f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_metadata/src/rmeta/decoder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1098,8 +1098,8 @@ impl<'a, 'tcx> CrateMetadataRef<'a> {
10981098
}
10991099

11001100
let def_key = self.def_key(child_index);
1101-
let span = self.get_span(child_index, sess);
11021101
if def_key.disambiguated_data.data.get_opt_name().is_some() {
1102+
let span = self.get_span(child_index, sess);
11031103
let kind = self.def_kind(child_index);
11041104
let ident = self.item_ident(child_index, sess);
11051105
let vis = self.get_visibility(child_index);

0 commit comments

Comments
 (0)