From 1907589fbb87e63b2c93808f485f021d2cc81ca5 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Fri, 8 Nov 2019 16:15:17 -0800 Subject: [PATCH] rustdoc: Stabilize `edition` annotation. --- src/librustdoc/html/markdown.rs | 4 +--- src/test/rustdoc/edition-flag.rs | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/librustdoc/html/markdown.rs b/src/librustdoc/html/markdown.rs index 9ff1e1d31197d..fc4dc52f127df 100644 --- a/src/librustdoc/html/markdown.rs +++ b/src/librustdoc/html/markdown.rs @@ -680,9 +680,7 @@ impl LangString { seen_rust_tags = !seen_other_tags || seen_rust_tags; data.no_run = true; } - x if allow_error_code_check && x.starts_with("edition") => { - // allow_error_code_check is true if we're on nightly, which - // is needed for edition support + x if x.starts_with("edition") => { data.edition = x[7..].parse::().ok(); } x if allow_error_code_check && x.starts_with("E") && x.len() == 5 => { diff --git a/src/test/rustdoc/edition-flag.rs b/src/test/rustdoc/edition-flag.rs index ddbc2be651d90..e54c7d2969bfe 100644 --- a/src/test/rustdoc/edition-flag.rs +++ b/src/test/rustdoc/edition-flag.rs @@ -1,4 +1,4 @@ -// compile-flags:--test -Z unstable-options +// compile-flags:--test // edition:2018 /// ```rust