diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index d37f4e9393502..432aaac15aa18 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -2265,21 +2265,22 @@ fn document_stability(w: &mut fmt::Formatter, cx: &Context, item: &clean::Item) fn document_non_exhaustive(w: &mut fmt::Formatter, item: &clean::Item) -> fmt::Result { if item.non_exhaustive { + let name = item.type_(); write!(w, r##"
🔬 - This type is marked as non exhaustive. + This {} is marked as non exhaustive.

- This type will require a wildcard arm in any match statements or constructors. + This {} will require a wildcard arm in any match statements or constructors.

- "##)?; + "##, name, name)?; } Ok(()) diff --git a/src/librustdoc/html/static/themes/dark.css b/src/librustdoc/html/static/themes/dark.css index 7add0e21f548c..bb33cd0302554 100644 --- a/src/librustdoc/html/static/themes/dark.css +++ b/src/librustdoc/html/static/themes/dark.css @@ -188,6 +188,7 @@ a.test-arrow { border-color: #008dfd; } +.stab.non-exhaustive { background: #2a2a2a; border-color: #707070; } .stab.unstable { background: #FFF5D6; border-color: #FFC600; color: #404040; } .stab.deprecated { background: #F3DFFF; border-color: #7F0087; color: #404040; } .stab.portability { background: #C4ECFF; border-color: #7BA5DB; color: #404040; } @@ -406,4 +407,4 @@ kbd { } .search-results td span.grey { color: #ccc; -} \ No newline at end of file +}