@@ -23,7 +23,7 @@ declare_lint! {
23
23
///
24
24
/// When working with raw pointers it's usually undesirable to create references,
25
25
/// since they inflict a lot of safety requirement. Unfortunately, it's possible
26
- /// to take a reference to a dereferece of a raw pointer implitly , which inflicts
26
+ /// to take a reference to a dereference of a raw pointer implicitly , which inflicts
27
27
/// the usual reference requirements without you even knowing that.
28
28
///
29
29
/// If you are sure, you can soundly take a reference, then you can take it explicitly:
@@ -68,9 +68,9 @@ impl<'tcx> LateLintPass<'tcx> for ImplicitUnsafeAutorefs {
68
68
let msg = "implicit auto-ref creates a reference to a dereference of a raw pointer" ;
69
69
cx. struct_span_lint ( IMPLICIT_UNSAFE_AUTOREFS , expr. span , msg, |lint| {
70
70
lint
71
- . note ( "creating a reference inflicts a lot of safety requirements" )
71
+ . note ( "creating a reference requires the pointer to be valid and imposes aliasing requirements" )
72
72
. multipart_suggestion (
73
- "if this reference is intentional, make it explicit" ,
73
+ "try using a raw pointer method instead; or if this reference is intentional, make it explicit" ,
74
74
vec ! [
75
75
( expr. span. shrink_to_lo( ) , format!( "(&{mutbl}" ) ) ,
76
76
( expr. span. shrink_to_hi( ) , ")" . to_owned( ) )
0 commit comments