Skip to content

Commit 7c5bc20

Browse files
committed
Address comments
1 parent f6dd332 commit 7c5bc20

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

compiler/rustc_middle/src/middle/stability.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -306,10 +306,7 @@ impl<'tcx> TyCtxt<'tcx> {
306306
let path = &with_no_trimmed_paths(|| self.def_path_str(def_id));
307307
let kind = self.def_kind(def_id).descr(def_id);
308308
let (message, lint) = deprecation_message(&depr_entry.attr, kind, path);
309-
let span = match method_span {
310-
None => span,
311-
Some(method_span) => method_span,
312-
};
309+
let span = method_span.unwrap_or(span);
313310
late_report_deprecation(
314311
self,
315312
&message,

0 commit comments

Comments
 (0)