fix(parser): fix comment typos (#3036)

Fix 2 typos in comments.
This commit is contained in:
overlookmotel 2024-04-20 10:43:25 +01:00 committed by GitHub
parent 233654af54
commit d44301c871
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -572,7 +572,7 @@ impl<'a> SourcePosition<'a> {
// SAFETY: // SAFETY:
// Caller guarantees `self` is not at end of source text. // Caller guarantees `self` is not at end of source text.
// `Source` is created from a valid `&str`, so points to allocated, initialized memory. // `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. // 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. // 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). // Alignment is not relevant as `u8` is aligned on 1 (i.e. no alignment requirements).
@ -590,7 +590,7 @@ impl<'a> SourcePosition<'a> {
// SAFETY: // SAFETY:
// Caller guarantees `self` is not at no later than 2 bytes before end of source text. // 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` 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. // 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. // 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). // Alignment is not relevant as `u8` is aligned on 1 (i.e. no alignment requirements).