diff --git a/src/assembler/session/builder.rs b/src/assembler/session/builder.rs index c9b88ac..b3199b9 100644 --- a/src/assembler/session/builder.rs +++ b/src/assembler/session/builder.rs @@ -55,7 +55,7 @@ impl Backend for CompositeSession where R: SpanSystem, I: StringSource, - Self: MacroSource + Diagnostics, + Self: Diagnostics, for<'a> DiagnosticsContext<'a, C, R, D>: Diagnostics, { fn define_symbol(&mut self, name: SymbolId, _span: R::Span, expr: Expr) { @@ -133,10 +133,6 @@ where } } -impl SymbolSource for ObjectBuilder { - type SymbolId = SymbolId; -} - impl AllocSymbol for ObjectBuilder { fn alloc_symbol(&mut self, _span: S) -> SymbolId { self.object.content.symbols.alloc().into() diff --git a/src/assembler/session/macros.rs b/src/assembler/session/macros.rs index 010187e..95eb752 100644 --- a/src/assembler/session/macros.rs +++ b/src/assembler/session/macros.rs @@ -27,16 +27,7 @@ pub(crate) type VecMacroTable = Vec>>; pub type MacroArgs = (Box<[Box<[T]>]>, Box<[Box<[S]>]>); -impl MacroSource for VecMacroTable { - type MacroId = MacroId; -} - -impl<'a, C, R: SpanSystem, I: StringSource, D> MacroSource for CompositeSession { - type MacroId = MacroId; -} - -impl MacroTable::Span> - for CompositeSession +impl MacroTable for CompositeSession where Self: Lex, C: Codebase, @@ -47,7 +38,6 @@ where Self: EmitDiag, Self: StartScope + NameTable, Self: Backend, - Self: MacroSource, ::StringRef: 'static, ::Span: 'static, >::TokenIter: 'static, diff --git a/src/assembler/session/mod.rs b/src/assembler/session/mod.rs index d6cdfb3..845cd60 100644 --- a/src/assembler/session/mod.rs +++ b/src/assembler/session/mod.rs @@ -95,14 +95,6 @@ pub trait StringSource { type StringRef: Clone + Debug + Eq + Hash; } -pub trait SymbolSource { - type SymbolId: Clone; -} - -pub(crate) trait MacroSource { - type MacroId: Clone; -} - pub(super) type Session<'a> = CompositeSession< FileCodebase<'a, dyn FileSystem>, RcContextFactory, @@ -224,10 +216,6 @@ impl, I: StringSource, D> StringSource for CompositeSess type StringRef = I::StringRef; } -impl, I: StringSource, D> SymbolSource for CompositeSession { - type SymbolId = SymbolId; -} - impl, I: StringSource, D> NextToken for CompositeSession { fn next_token(&mut self) -> Option> { let token = self @@ -246,7 +234,6 @@ impl, I: StringSource, D> NextToken for CompositeSession impl, I: StringSource, D> EmitDiag for CompositeSession where - Self: SymbolSource + MacroSource, for<'a> DiagnosticsContext<'a, C, R, D>: EmitDiag, R::Stripped: Clone, {