]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_parse/src/parser/item.rs
Rollup merge of #94839 - TaKO8Ki:suggest-using-double-colon-for-struct-field-type...
[rust.git] / compiler / rustc_parse / src / parser / item.rs
index ec89301c1e22edf17358721a99c63179ee207dcf..122fe10e80f8fb331ce3aab4cae7a15c923ec420 100644 (file)
@@ -14,7 +14,7 @@
 use rustc_ast::{MacArgs, MacCall, MacDelimiter};
 use rustc_ast_pretty::pprust;
 use rustc_errors::{struct_span_err, Applicability, PResult, StashKey};
-use rustc_span::edition::{Edition, LATEST_STABLE_EDITION};
+use rustc_span::edition::Edition;
 use rustc_span::lev_distance::lev_distance;
 use rustc_span::source_map::{self, Span};
 use rustc_span::symbol::{kw, sym, Ident, Symbol};
@@ -2112,8 +2112,7 @@ fn ban_async_in_2015(&self, span: Span) {
             let diag = self.diagnostic();
             struct_span_err!(diag, span, E0670, "`async fn` is not permitted in Rust 2015")
                 .span_label(span, "to use `async fn`, switch to Rust 2018 or later")
-                .help(&format!("set `edition = \"{}\"` in `Cargo.toml`", LATEST_STABLE_EDITION))
-                .note("for more on editions, read https://doc.rust-lang.org/edition-guide")
+                .help_use_latest_edition()
                 .emit();
         }
     }