diff options
| author | Dániel Buga <bugadani@gmail.com> | 2021-01-03 12:50:29 +0100 |
|---|---|---|
| committer | Dániel Buga <bugadani@gmail.com> | 2021-01-03 13:55:43 +0100 |
| commit | 4d3227fe1c14c089afb6d2bfa266a78336bf4fc1 (patch) | |
| tree | 8d863ec771f0b3016dd6f5b890723c4382ebf9d6 | |
| parent | 250fb72d1b39b013d661544428bd5db315573da3 (diff) | |
| download | rust-4d3227fe1c14c089afb6d2bfa266a78336bf4fc1.tar.gz rust-4d3227fe1c14c089afb6d2bfa266a78336bf4fc1.zip | |
Move variable into condition where it's used
| -rw-r--r-- | compiler/rustc_metadata/src/rmeta/decoder.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_metadata/src/rmeta/decoder.rs b/compiler/rustc_metadata/src/rmeta/decoder.rs index 90e72ba2ac2..a4bb5f8dc95 100644 --- a/compiler/rustc_metadata/src/rmeta/decoder.rs +++ b/compiler/rustc_metadata/src/rmeta/decoder.rs @@ -1098,8 +1098,8 @@ impl<'a, 'tcx> CrateMetadataRef<'a> { } let def_key = self.def_key(child_index); - let span = self.get_span(child_index, sess); if def_key.disambiguated_data.data.get_opt_name().is_some() { + let span = self.get_span(child_index, sess); let kind = self.def_kind(child_index); let ident = self.item_ident(child_index, sess); let vis = self.get_visibility(child_index); |
