@@ -1871,8 +1871,10 @@ fn short_stability(item: &clean::Item, cx: &Context, show_reason: bool) -> Vec<S
1871
1871
} ;
1872
1872
1873
1873
if stab. level == stability:: Unstable {
1874
- let unstable_extra = if show_reason {
1875
- match ( !stab. feature . is_empty ( ) , & cx. shared . issue_tracker_base_url , stab. issue ) {
1874
+ if show_reason {
1875
+ let unstable_extra = match ( !stab. feature . is_empty ( ) ,
1876
+ & cx. shared . issue_tracker_base_url ,
1877
+ stab. issue ) {
1876
1878
( true , & Some ( ref tracker_url) , Some ( issue_no) ) if issue_no > 0 =>
1877
1879
format ! ( " (<code>{}</code> <a href=\" {}{}\" >#{}</a>)" ,
1878
1880
Escape ( & stab. feature) , tracker_url, issue_no, issue_no) ,
@@ -1882,17 +1884,22 @@ fn short_stability(item: &clean::Item, cx: &Context, show_reason: bool) -> Vec<S
1882
1884
( true , ..) =>
1883
1885
format ! ( " (<code>{}</code>)" , Escape ( & stab. feature) ) ,
1884
1886
_ => String :: new ( ) ,
1887
+ } ;
1888
+ if stab. unstable_reason . is_empty ( ) {
1889
+ stability. push ( format ! ( "<div class='stab unstable'>\
1890
+ <span class=microscope>🔬</span> \
1891
+ This is a nightly-only experimental API. {}</div>",
1892
+ unstable_extra) ) ;
1893
+ } else {
1894
+ let text = format ! ( "<summary><span class=microscope>🔬</span> \
1895
+ This is a nightly-only experimental API. {}</summary>{}",
1896
+ unstable_extra, MarkdownHtml ( & stab. unstable_reason) ) ;
1897
+ stability. push ( format ! ( "<div class='stab unstable'><details>{}</details></div>" ,
1898
+ text) ) ;
1885
1899
}
1886
1900
} else {
1887
- String :: new ( )
1888
- } ;
1889
- let unstable_reason = if show_reason && !stab. unstable_reason . is_empty ( ) {
1890
- format ! ( ": {}" , stab. unstable_reason)
1891
- } else {
1892
- String :: new ( )
1893
- } ;
1894
- let text = format ! ( "Unstable{}{}" , unstable_extra, MarkdownHtml ( & unstable_reason) ) ;
1895
- stability. push ( format ! ( "<div class='stab unstable'>{}</div>" , text) )
1901
+ stability. push ( format ! ( "<div class='stab unstable'>Experimental</div>" ) )
1902
+ }
1896
1903
} ;
1897
1904
} else if let Some ( depr) = item. deprecation . as_ref ( ) {
1898
1905
let note = if show_reason && !depr. note . is_empty ( ) {
0 commit comments