about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/libstd/keyword_docs.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libstd/keyword_docs.rs b/src/libstd/keyword_docs.rs
index a957bcf215f..a4996d9eee8 100644
--- a/src/libstd/keyword_docs.rs
+++ b/src/libstd/keyword_docs.rs
@@ -1238,8 +1238,7 @@ mod unsafe_keyword {}
 /// Note that when the wildcard `*` is used on a type, it does not import its methods (though
 /// for `enum`s it imports the variants, as shown in the example below).
 ///
-/// ```compile_fail
-/// # fn main() {
+/// ```compile_fail,edition2018
 /// enum ExampleEnum {
 ///     VariantA,
 ///     VariantB,
@@ -1258,7 +1257,6 @@ mod unsafe_keyword {}
 ///
 /// // Does not compile !
 /// let n = new();
-/// # }
 /// ```
 ///
 /// For more information on `use` and paths in general, see the [Reference].