@@ -23,7 +23,7 @@ declare_lint! {
2323 ///
2424 /// When working with raw pointers it's usually undesirable to create references,
2525 /// 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
2727 /// the usual reference requirements without you even knowing that.
2828 ///
2929 /// 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 {
6868 let msg = "implicit auto-ref creates a reference to a dereference of a raw pointer" ;
6969 cx. struct_span_lint ( IMPLICIT_UNSAFE_AUTOREFS , expr. span , msg, |lint| {
7070 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" )
7272 . 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" ,
7474 vec ! [
7575 ( expr. span. shrink_to_lo( ) , format!( "(&{mutbl}" ) ) ,
7676 ( expr. span. shrink_to_hi( ) , ")" . to_owned( ) )
0 commit comments