Fix some warnings

This commit is contained in:
Sofia 2025-07-17 14:31:40 +03:00
parent cb2604dc22
commit e2dc1a3f85
5 changed files with 2 additions and 32 deletions

View File

@ -68,24 +68,6 @@ pub enum StackValueKind {
Any(InstructionValue), Any(InstructionValue),
} }
impl StackValueKind {
unsafe fn get_instr(&self) -> &InstructionValue {
match self {
StackValueKind::Immutable(val) => val,
StackValueKind::Mutable(val) => val,
StackValueKind::Any(val) => val,
}
}
fn with_instr(&self, instr: InstructionValue) -> StackValueKind {
match self {
StackValueKind::Immutable(_) => StackValueKind::Immutable(instr),
StackValueKind::Mutable(_) => StackValueKind::Mutable(instr),
StackValueKind::Any(_) => StackValueKind::Any(instr),
}
}
}
impl<'ctx, 'a> Scope<'ctx, 'a> { impl<'ctx, 'a> Scope<'ctx, 'a> {
fn with_block(&self, block: Block<'ctx>) -> Scope<'ctx, 'a> { fn with_block(&self, block: Block<'ctx>) -> Scope<'ctx, 'a> {
Scope { Scope {

View File

@ -1,8 +1,4 @@
use super::{ use super::{typecheck::ErrorKind, typerefs::TypeRefs, VagueType as Vague, *};
typecheck::ErrorKind,
typerefs::{ScopeTypeRefs, TypeRef, TypeRefs},
VagueType as Vague, *,
};
#[derive(Debug, Clone)] #[derive(Debug, Clone)]
pub enum ReturnTypeOther { pub enum ReturnTypeOther {

View File

@ -2,7 +2,6 @@ use std::{
cell::RefCell, cell::RefCell,
collections::HashMap, collections::HashMap,
convert::Infallible, convert::Infallible,
fmt::Error,
fs::{self}, fs::{self},
path::PathBuf, path::PathBuf,
rc::Rc, rc::Rc,

View File

@ -6,7 +6,7 @@ use crate::{mir::*, util::try_all};
use VagueType as Vague; use VagueType as Vague;
use super::{ use super::{
pass::{Pass, PassState, ScopeFunction, ScopeVariable, Storage}, pass::{Pass, PassState, ScopeFunction, ScopeVariable},
typerefs::TypeRefs, typerefs::TypeRefs,
}; };

View File

@ -162,13 +162,6 @@ impl<'a, 'b> TokenStream<'a, 'b> {
end: self.position, end: self.position,
}) })
} }
pub fn get_one_token_range(&self) -> TokenRange {
TokenRange {
start: self.position - 1,
end: self.position,
}
}
} }
impl Drop for TokenStream<'_, '_> { impl Drop for TokenStream<'_, '_> {