From 53acfc3f8a52f9d26ce3ea3cdaea00345b1e9973 Mon Sep 17 00:00:00 2001 From: Mark Rousskov Date: Fri, 13 Sep 2019 14:59:08 -0400 Subject: [PATCH] Utilize shared error codes rather than re-querying env --- src/librustdoc/html/render.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index e3f227e0cf4d..e66224c0b5e0 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -2123,7 +2123,7 @@ fn stability_tags(item: &clean::Item) -> String { /// documentation. fn short_stability(item: &clean::Item, cx: &Context) -> Vec { 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]