remove "constant" functions

The goal here is that ALL `Id` values come from a `Table`
This commit is contained in:
Niko Matsakis 2024-08-15 17:36:09 +03:00
parent 31257ba758
commit 8833a7168b
2 changed files with 2 additions and 16 deletions

View file

@ -104,8 +104,8 @@ impl Macro {
}
let needs_interner = match function_type {
FunctionType::RequiresInterning => true,
FunctionType::Constant | FunctionType::SalsaStruct => false,
FunctionType::Constant | FunctionType::RequiresInterning => true,
FunctionType::SalsaStruct => false,
};
let lru = Literal::usize_unsuffixed(self.args.lru.unwrap_or(0));

View file

@ -118,20 +118,6 @@ impl FromId for Id {
}
}
/// As a special case, we permit `Singleton` to be converted to an `Id`.
/// This is useful for declaring functions with no arguments.
impl AsId for () {
fn as_id(&self) -> Id {
Id::from_u32(0)
}
}
impl FromId for () {
fn from_id(id: Id) -> Self {
assert_eq!(0, id.as_u32());
}
}
impl<'db, ID: FromId> LookupId<'db> for ID {
fn lookup_id(id: Id, _db: &'db dyn Database) -> Self {
Self::from_id(id)