about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-02-24 10:02:26 +0000
committerbors <bors@rust-lang.org>2022-02-24 10:02:26 +0000
commit7ccfe2ff1d59666dc0188dfd5847304fec257565 (patch)
tree48ab85a723d1398aa894f6fe89e88d01986b8f57 /src
parent1204400ab8da9830f6f77a5e40e7ad3ea459676a (diff)
parent7afcf9fcd14af52e53e38ffe60b1eac9b3232b21 (diff)
downloadrust-7ccfe2ff1d59666dc0188dfd5847304fec257565.tar.gz
rust-7ccfe2ff1d59666dc0188dfd5847304fec257565.zip
Auto merge of #94129 - cjgillot:rmeta-table, r=petrochenkov
Back more metadata using per-query tables

r? `@ghost`
Diffstat (limited to 'src')
-rw-r--r--src/librustdoc/clean/types.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustdoc/clean/types.rs b/src/librustdoc/clean/types.rs
index 74184427dd5..467a6940628 100644
--- a/src/librustdoc/clean/types.rs
+++ b/src/librustdoc/clean/types.rs
@@ -381,12 +381,12 @@ crate fn rustc_span(def_id: DefId, tcx: TyCtxt<'_>) -> Span {
 }
 
 impl Item {
-    crate fn stability<'tcx>(&self, tcx: TyCtxt<'tcx>) -> Option<&'tcx Stability> {
+    crate fn stability<'tcx>(&self, tcx: TyCtxt<'tcx>) -> Option<Stability> {
         self.def_id.as_def_id().and_then(|did| tcx.lookup_stability(did))
     }
 
     crate fn const_stability<'tcx>(&self, tcx: TyCtxt<'tcx>) -> Option<ConstStability> {
-        self.def_id.as_def_id().and_then(|did| tcx.lookup_const_stability(did)).map(|cs| *cs)
+        self.def_id.as_def_id().and_then(|did| tcx.lookup_const_stability(did))
     }
 
     crate fn deprecation(&self, tcx: TyCtxt<'_>) -> Option<Deprecation> {