diff --git a/backend-utils/src/lib.rs b/backend-utils/src/lib.rs index b0c551df44..9bb03a6112 100644 --- a/backend-utils/src/lib.rs +++ b/backend-utils/src/lib.rs @@ -7,9 +7,8 @@ use std::{ use itertools::Itertools; use powdr_ast::{ analyzed::{ - AlgebraicExpression, Analyzed, Identity, LookupIdentity, PermutationIdentity, - PhantomLookupIdentity, PhantomPermutationIdentity, Reference, StatementIdentifier, Symbol, - SymbolKind, + AlgebraicExpression, Analyzed, Identity, PhantomLookupIdentity, PhantomPermutationIdentity, + Reference, StatementIdentifier, Symbol, SymbolKind, }, parsed::{ asm::{AbsoluteSymbolPath, SymbolPath}, @@ -220,9 +219,7 @@ fn split_by_namespace( 1 => (namespaces.into_iter().next().unwrap() == current_namespace) .then(|| (current_namespace.clone(), statement)), _ => match identity { - Identity::Lookup(LookupIdentity { left, right, .. }) - | Identity::PhantomLookup(PhantomLookupIdentity { left, right, .. }) - | Identity::Permutation(PermutationIdentity { left, right, .. }) + Identity::PhantomLookup(PhantomLookupIdentity { left, right, .. }) | Identity::PhantomPermutation(PhantomPermutationIdentity { left, right, @@ -241,6 +238,9 @@ fn split_by_namespace( log::debug!("Skipping connecting identity: {identity}"); None } + Identity::Lookup(_) | Identity::Permutation(_) => { + panic!("Unexpected native connection: {identity}") + } _ => { panic!("Identity references multiple namespaces: {identity}"); }