From d1a37058df2c960831389fbb3fd84e2b28836d1e Mon Sep 17 00:00:00 2001 From: sofia Date: Wed, 16 Jul 2025 16:16:58 +0300 Subject: [PATCH] Fix warnings --- reid-llvm-lib/src/builder.rs | 2 +- reid-llvm-lib/src/debug.rs | 2 +- reid/src/mir/typeinference.rs | 4 ++-- reid/src/mir/typerefs.rs | 2 +- reid/src/mir/types.rs | 4 ---- 5 files changed, 5 insertions(+), 9 deletions(-) diff --git a/reid-llvm-lib/src/builder.rs b/reid-llvm-lib/src/builder.rs index 05e120b..71980b5 100644 --- a/reid-llvm-lib/src/builder.rs +++ b/reid-llvm-lib/src/builder.rs @@ -1,7 +1,7 @@ //! This module contains simply [`Builder`] and it's related utility Values. //! Builder is the actual struct being modified when building the LLIR. -use std::{cell::RefCell, collections::HashMap, rc::Rc}; +use std::{cell::RefCell, rc::Rc}; use crate::{ BlockData, ConstValue, CustomTypeKind, FunctionData, Instr, InstructionData, ModuleData, diff --git a/reid-llvm-lib/src/debug.rs b/reid-llvm-lib/src/debug.rs index 6755ae0..806a4ca 100644 --- a/reid-llvm-lib/src/debug.rs +++ b/reid-llvm-lib/src/debug.rs @@ -5,7 +5,7 @@ use std::{ marker::PhantomData, }; -use crate::{CmpPredicate, Instr, InstructionData, NamedStruct, TerminatorKind, builder::*}; +use crate::{CmpPredicate, Instr, InstructionData, TerminatorKind, builder::*}; impl Debug for Builder { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { diff --git a/reid/src/mir/typeinference.rs b/reid/src/mir/typeinference.rs index 493279a..b0e6820 100644 --- a/reid/src/mir/typeinference.rs +++ b/reid/src/mir/typeinference.rs @@ -9,13 +9,13 @@ use std::{convert::Infallible, iter}; use crate::{mir::TypeKind, util::try_all}; use super::{ - pass::{self, Pass, PassState}, + pass::{Pass, PassState}, typecheck::ErrorKind, typerefs::{ScopeTypeRefs, TypeRef, TypeRefs}, types::{pick_return, ReturnType}, Block, ExprKind, Expression, FunctionDefinition, FunctionDefinitionKind, IfExpression, IndexedVariableReference, IndexedVariableReferenceKind, Module, NamedVariableRef, ReturnKind, - StmtKind, StructType, TypeDefinitionKind, + StmtKind, TypeDefinitionKind, TypeKind::*, VagueType::*, }; diff --git a/reid/src/mir/typerefs.rs b/reid/src/mir/typerefs.rs index a3f1e62..11170a5 100644 --- a/reid/src/mir/typerefs.rs +++ b/reid/src/mir/typerefs.rs @@ -8,7 +8,7 @@ use crate::mir::VagueType; use super::{ typecheck::{Collapsable, ErrorKind}, - BinaryOperator, TypeDefinition, TypeKind, + BinaryOperator, TypeKind, }; #[derive(Clone)] diff --git a/reid/src/mir/types.rs b/reid/src/mir/types.rs index 087b74e..6a2ab96 100644 --- a/reid/src/mir/types.rs +++ b/reid/src/mir/types.rs @@ -1,7 +1,3 @@ -use std::collections::HashMap; - -use crate::util::try_all; - use super::*; #[derive(Debug, Clone)]