Remove the fn main() in code example

This commit is contained in:
Poliorcetics 2020-05-30 19:18:05 +02:00 committed by GitHub
parent b0e524d444
commit 4bae9e5937
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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].