Add runtime check to avoid overwrite arg easily in diag and store and restore snapshot when set subdiag arg
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
This commit is contained in:
@@ -422,12 +422,12 @@ fn build_mismatch_suggestion(
|
||||
lifetime_name: &str,
|
||||
infos: &[&Info<'_>],
|
||||
) -> lints::MismatchedLifetimeSyntaxesSuggestion {
|
||||
let lifetime_name = lifetime_name.to_owned();
|
||||
let lifetime_name_sugg = lifetime_name.to_owned();
|
||||
|
||||
let suggestions = infos.iter().map(|info| info.suggestion(&lifetime_name)).collect();
|
||||
|
||||
lints::MismatchedLifetimeSyntaxesSuggestion::Explicit {
|
||||
lifetime_name,
|
||||
lifetime_name_sugg,
|
||||
suggestions,
|
||||
tool_only: false,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user