about summary refs log tree commit diff
path: root/compiler/rustc_parse/messages.ftl
diff options
context:
space:
mode:
authorKivooeo <Kivooeo123@gmail.com>2025-04-16 18:16:04 +0500
committerKivooeo <Kivooeo123@gmail.com>2025-04-22 00:53:12 +0500
commitb5e8f1f0cec8065eb9cb453ad4c5aa5bec8baf32 (patch)
tree174d06433f9a50c9b83a7dd1463762a708ced5ae /compiler/rustc_parse/messages.ftl
parentb8c54d6358926028ac2fab1ec2b8665c70edb1c0 (diff)
downloadrust-b5e8f1f0cec8065eb9cb453ad4c5aa5bec8baf32.tar.gz
rust-b5e8f1f0cec8065eb9cb453ad4c5aa5bec8baf32.zip
improve diagnostic for raw pointer field access using `->`
Diffstat (limited to 'compiler/rustc_parse/messages.ftl')
-rw-r--r--compiler/rustc_parse/messages.ftl4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_parse/messages.ftl b/compiler/rustc_parse/messages.ftl
index e7f17bb6f99..97bade2d31e 100644
--- a/compiler/rustc_parse/messages.ftl
+++ b/compiler/rustc_parse/messages.ftl
@@ -246,9 +246,9 @@ parse_expected_struct_field = expected one of `,`, `:`, or `{"}"}`, found `{$tok
 
 parse_expected_trait_in_trait_impl_found_type = expected a trait, found type
 
-parse_expr_rarrow_call = `->` used for field access or method call
+parse_expr_rarrow_call = `->` is not valid syntax for field accesses and method calls
     .suggestion = try using `.` instead
-    .help = the `.` operator will dereference the value if needed
+    .help = the `.` operator will automatically dereference the value, except if the value is a raw pointer
 
 parse_extern_crate_name_with_dashes = crate name using dashes are not valid in `extern crate` statements
     .label = dash-separated idents are not valid