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),
}
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> {
fn with_block(&self, block: Block<'ctx>) -> Scope<'ctx, 'a> {
Scope {

View File

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

View File

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

View File

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

View File

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