Add clone comment

This commit is contained in:
Ayaz Hafiz 2022-10-02 21:41:10 -05:00
parent a6cf21dcf9
commit e1aadbc6ef
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58

View file

@ -2,7 +2,9 @@ use roc_region::all::{Position, Region};
use std::fmt;
/// A position in a source file.
#[derive(Clone, Copy)]
// NB: [Copy] is explicitly NOT derived to reduce the chance of bugs due to accidentally re-using
// parser state.
#[derive(Clone)]
pub struct State<'a> {
/// The raw input bytes from the file.
/// Beware: original_bytes[0] always points the the start of the file.