Refactor creation of functions in the backend

This commit refactors the lowest-level primitive for creating functions into a
new `create_one_function` function. This doesn't take into account overloading
but is suitable for things like `create_{getter,setter}`. Eventually the
overloading will be implemented in terms of this function.
This commit is contained in:
Alex Crichton
2018-08-29 10:28:04 -07:00
parent 0a38e44f1f
commit 4f76a00024
3 changed files with 147 additions and 132 deletions

View File

@ -577,7 +577,7 @@ impl<'src> FirstPassRecord<'src> {
use weedle::interface::Special;
let is_static = match modifier {
Some(Stringifier(_)) => uniimplemented!(), // filtered out earlier
Some(Stringifier(_)) => unimplemented!(), // filtered out earlier
Some(Static(_)) => true,
None => false,
};