fix wrong msrv import in new_lint template

This commit is contained in:
J-ZhengLi 2024-06-21 12:03:40 +08:00
parent 3e84ca8ac9
commit dcb6a54b80

View file

@ -273,7 +273,7 @@ fn get_lint_file_contents(lint: &LintData<'_>, enable_msrv: bool) -> String {
result.push_str(&if enable_msrv {
formatdoc!(
r#"
use clippy_utils::msrvs::{{self, Msrv}};
use clippy_config::msrvs::{{self, Msrv}};
{pass_import}
use rustc_lint::{{{context_import}, {pass_type}, LintContext}};
use rustc_session::impl_lint_pass;
@ -399,7 +399,7 @@ fn create_lint_for_ty(lint: &LintData<'_>, enable_msrv: bool, ty: &str) -> io::R
let _: fmt::Result = writedoc!(
lint_file_contents,
r#"
use clippy_utils::msrvs::{{self, Msrv}};
use clippy_config::msrvs::{{self, Msrv}};
use rustc_lint::{{{context_import}, LintContext}};
use super::{name_upper};