File tree Expand file tree Collapse file tree 3 files changed +5
-8
lines changed Expand file tree Collapse file tree 3 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -376,8 +376,8 @@ impl Item {
376376 self . def_id . as_def_id ( ) . and_then ( |did| tcx. lookup_stability ( did) )
377377 }
378378
379- crate fn const_stability < ' tcx > ( & self , tcx : TyCtxt < ' tcx > ) -> Option < & ' tcx ConstStability > {
380- self . def_id . as_def_id ( ) . and_then ( |did| tcx. lookup_const_stability ( did) )
379+ crate fn const_stability < ' tcx > ( & self , tcx : TyCtxt < ' tcx > ) -> Option < ConstStability > {
380+ self . def_id . as_def_id ( ) . and_then ( |did| tcx. lookup_const_stability ( did) ) . map ( |cs| * cs )
381381 }
382382
383383 crate fn deprecation ( & self , tcx : TyCtxt < ' _ > ) -> Option < Deprecation > {
Original file line number Diff line number Diff line change @@ -1349,10 +1349,7 @@ impl PrintWithSpace for hir::Mutability {
13491349 }
13501350}
13511351
1352- crate fn print_constness_with_space (
1353- c : & hir:: Constness ,
1354- s : Option < & ConstStability > ,
1355- ) -> & ' static str {
1352+ crate fn print_constness_with_space ( c : & hir:: Constness , s : Option < ConstStability > ) -> & ' static str {
13561353 match ( c, s) {
13571354 // const stable or when feature(staged_api) is not set
13581355 (
Original file line number Diff line number Diff line change @@ -805,7 +805,7 @@ fn assoc_type(
805805fn render_stability_since_raw (
806806 w : & mut Buffer ,
807807 ver : Option < Symbol > ,
808- const_stability : Option < & ConstStability > ,
808+ const_stability : Option < ConstStability > ,
809809 containing_ver : Option < Symbol > ,
810810 containing_const_ver : Option < Symbol > ,
811811) {
@@ -814,7 +814,7 @@ fn render_stability_since_raw(
814814 match ( ver, const_stability) {
815815 // stable and const stable
816816 ( Some ( v) , Some ( ConstStability { level : StabilityLevel :: Stable { since } , .. } ) )
817- if Some ( * since) != containing_const_ver =>
817+ if Some ( since) != containing_const_ver =>
818818 {
819819 write ! (
820820 w,
You can’t perform that action at this time.
0 commit comments