about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMark Rousskov <mark.simulacrum@gmail.com>2019-09-13 14:59:08 -0400
committerMark Rousskov <mark.simulacrum@gmail.com>2019-09-23 07:48:24 -0400
commit53acfc3f8a52f9d26ce3ea3cdaea00345b1e9973 (patch)
treeee6a371731992ca17b0119ad06f335c3c2d92028
parent583a81dc5e19bcc21092c8f16fd7185c357bd077 (diff)
Utilize shared error codes rather than re-querying env
-rw-r--r--src/librustdoc/html/render.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs
index e3f227e0cf4..e66224c0b5e 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<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]