Skip to content

Commit 4bae9e5

Browse files
authored
Remove the fn main() in code example
1 parent b0e524d commit 4bae9e5

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/libstd/keyword_docs.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -1238,8 +1238,7 @@ mod unsafe_keyword {}
12381238
/// Note that when the wildcard `*` is used on a type, it does not import its methods (though
12391239
/// for `enum`s it imports the variants, as shown in the example below).
12401240
///
1241-
/// ```compile_fail
1242-
/// # fn main() {
1241+
/// ```compile_fail,edition2018
12431242
/// enum ExampleEnum {
12441243
/// VariantA,
12451244
/// VariantB,
@@ -1258,7 +1257,6 @@ mod unsafe_keyword {}
12581257
///
12591258
/// // Does not compile !
12601259
/// let n = new();
1261-
/// # }
12621260
/// ```
12631261
///
12641262
/// For more information on `use` and paths in general, see the [Reference].

0 commit comments

Comments
 (0)