From 389d9c3702aee5f6968e6ef5b27d69162de4cc17 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sun, 2 Nov 2025 16:53:30 +0200 Subject: [PATCH] Fix typo in lint_dangling_pointers_from_locals.local_var message formatting --- compiler/rustc_lint/messages.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_lint/messages.ftl b/compiler/rustc_lint/messages.ftl index 1f6a382175b7c..6b972d45da1f3 100644 --- a/compiler/rustc_lint/messages.ftl +++ b/compiler/rustc_lint/messages.ftl @@ -195,7 +195,7 @@ lint_confusable_identifier_pair = found both `{$existing_sym}` and `{$sym}` as i lint_dangling_pointers_from_locals = a dangling pointer will be produced because the local variable `{$local_var_name}` will be dropped .ret_ty = return type of the {$fn_kind} is `{$ret_ty}` - .local_var = `{$local_var_name}` is part the {$fn_kind} and will be dropped at the end of the {$fn_kind} + .local_var = `{$local_var_name}` is part of the {$fn_kind} and will be dropped at the end of the {$fn_kind} .created_at = dangling pointer created here .note = pointers do not have a lifetime; after returning, the `{$local_var_ty}` will be deallocated at the end of the {$fn_kind} because nothing is referencing it as far as the type system is concerned