Skip to content
Prev Previous commit
Next Next commit
vm
  • Loading branch information
ShaharNaveh committed Jul 4, 2025
commit 6cd01bff4b9a9a0f3aaa6fd24c88ba823dafc5b2
2 changes: 1 addition & 1 deletion vm/src/stdlib/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ pub struct PySourceLocation {
}

impl PySourceLocation {
fn to_source_location(&self) -> SourceLocation {
const fn to_source_location(&self) -> SourceLocation {
SourceLocation {
row: self.row.get_one_indexed(),
column: self.column.get_one_indexed(),
Expand Down
6 changes: 3 additions & 3 deletions vm/src/stdlib/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ mod _io {
}

#[inline]
fn raw_offset(&self) -> Offset {
const fn raw_offset(&self) -> Offset {
if (self.valid_read() || self.valid_write()) && self.raw_pos >= 0 {
self.raw_pos - self.pos
} else {
Expand All @@ -812,7 +812,7 @@ mod _io {
}

#[inline]
fn readahead(&self) -> Offset {
const fn readahead(&self) -> Offset {
if self.valid_read() {
self.read_end - self.pos
} else {
Expand Down Expand Up @@ -1278,7 +1278,7 @@ mod _io {
}
}

fn adjust_position(&mut self, new_pos: Offset) {
const fn adjust_position(&mut self, new_pos: Offset) {
self.pos = new_pos;
if self.valid_read() && self.read_end < self.pos {
self.read_end = self.pos
Expand Down