diff options
| author | hi-rustin <rustin.liu@gmail.com> | 2021-05-08 09:02:22 +0800 |
|---|---|---|
| committer | hi-rustin <rustin.liu@gmail.com> | 2021-05-08 09:02:22 +0800 |
| commit | 7c5bc204fa8cbfdbfe3a560aa3a3acc3b44ca116 (patch) | |
| tree | 90608dbae4b45418f3107493ed58334220235686 /compiler | |
| parent | f6dd332820f802ff346ad5937580c952532df718 (diff) | |
| download | rust-7c5bc204fa8cbfdbfe3a560aa3a3acc3b44ca116.tar.gz rust-7c5bc204fa8cbfdbfe3a560aa3a3acc3b44ca116.zip | |
Address comments
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_middle/src/middle/stability.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/rustc_middle/src/middle/stability.rs b/compiler/rustc_middle/src/middle/stability.rs index 1bb427d8a67..aa0f18846d1 100644 --- a/compiler/rustc_middle/src/middle/stability.rs +++ b/compiler/rustc_middle/src/middle/stability.rs @@ -306,10 +306,7 @@ impl<'tcx> TyCtxt<'tcx> { let path = &with_no_trimmed_paths(|| self.def_path_str(def_id)); let kind = self.def_kind(def_id).descr(def_id); let (message, lint) = deprecation_message(&depr_entry.attr, kind, path); - let span = match method_span { - None => span, - Some(method_span) => method_span, - }; + let span = method_span.unwrap_or(span); late_report_deprecation( self, &message, |
