From d44301c8715a4080699f33d0303eb102fc9eaa44 Mon Sep 17 00:00:00 2001 From: overlookmotel Date: Sat, 20 Apr 2024 10:43:25 +0100 Subject: [PATCH] fix(parser): fix comment typos (#3036) Fix 2 typos in comments. --- crates/oxc_parser/src/lexer/source.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/oxc_parser/src/lexer/source.rs b/crates/oxc_parser/src/lexer/source.rs index 371ee3ba0..8f1396be8 100644 --- a/crates/oxc_parser/src/lexer/source.rs +++ b/crates/oxc_parser/src/lexer/source.rs @@ -572,7 +572,7 @@ impl<'a> SourcePosition<'a> { // SAFETY: // Caller guarantees `self` is not at end of source text. // `Source` is created from a valid `&str`, so points to allocated, initialized memory. - // `Source` conceptually holds the source text `&str`, which guarantees to mutable references + // `Source` conceptually holds the source text `&str`, which guarantees no mutable references // to the same memory can exist, as that would violate Rust's aliasing rules. // Pointer is "dereferenceable" by definition as a `u8` is 1 byte and cannot span multiple objects. // Alignment is not relevant as `u8` is aligned on 1 (i.e. no alignment requirements). @@ -590,7 +590,7 @@ impl<'a> SourcePosition<'a> { // SAFETY: // Caller guarantees `self` is not at no later than 2 bytes before end of source text. // `Source` is created from a valid `&str`, so points to allocated, initialized memory. - // `Source` conceptually holds the source text `&str`, which guarantees to mutable references + // `Source` conceptually holds the source text `&str`, which guarantees no mutable references // to the same memory can exist, as that would violate Rust's aliasing rules. // Pointer is "dereferenceable" by definition as a `u8` is 1 byte and cannot span multiple objects. // Alignment is not relevant as `u8` is aligned on 1 (i.e. no alignment requirements).