Utilize shared error codes rather than re-querying env

This commit is contained in:
Mark Rousskov 2019-09-13 14:59:08 -04:00
parent 583a81dc5e
commit 53acfc3f8a

View File

@ -2123,7 +2123,7 @@ fn tag_html(class: &str, contents: &str) -> String {
/// documentation.
fn short_stability(item: &clean::Item, cx: &Context) -> Vec<String> {
let mut stability = vec![];
let error_codes = ErrorCodes::from(UnstableFeatures::from_environment().is_nightly_build());
let error_codes = cx.shared.codes;
if let Some(Deprecation { note, since }) = &item.deprecation() {
// We display deprecation messages for #[deprecated] and #[rustc_deprecated]