Remove PluginFunction::is_variadic.

This commit is contained in:
Stephen Chung 2021-05-29 18:32:34 +08:00
parent b5ed841ee7
commit 5f36f1a28c
6 changed files with 3 additions and 37 deletions

View File

@ -20,7 +20,7 @@ smallvec = { version = "1.6", default-features = false, features = ["union"] }
ahash = { version = "0.7", default-features = false }
num-traits = { version = "0.2", default_features = false }
smartstring = { version = "0.2.6", default_features = false }
rhai_codegen = { version = "0.3.4", path = "codegen", default_features = false }
rhai_codegen = { version = "0.3.7", path = "codegen", default_features = false }
[features]
default = ["smartstring/std", "ahash/std", "num-traits/std"] # remove 'smartstring/std' when smartstring is updated to support no-std

View File

@ -1,6 +1,6 @@
[package]
name = "rhai_codegen"
version = "0.3.6"
version = "0.3.7"
edition = "2018"
authors = ["jhwgh1968", "Stephen Chung"]
description = "Procedural macros support package for Rhai, a scripting language and engine for Rust"
@ -16,7 +16,7 @@ default = []
metadata = []
[dev-dependencies]
rhai = { path = "..", version = ">=0.19.15" }
rhai = { path = "..", version = ">=0.20.3" }
trybuild = "1"
[dependencies]

View File

@ -845,7 +845,6 @@ impl ExportedFn {
}
#[inline(always)] fn is_method_call(&self) -> bool { #is_method_call }
#[inline(always)] fn is_variadic(&self) -> bool { false }
}
}
}

View File

@ -286,7 +286,6 @@ mod generate_tests {
}
#[inline(always)] fn is_method_call(&self) -> bool { false }
#[inline(always)] fn is_variadic(&self) -> bool { false }
}
#[allow(unused)]
#[inline(always)] pub fn dynamic_result_fn() -> RhaiResult {
@ -322,7 +321,6 @@ mod generate_tests {
}
#[inline(always)] fn is_method_call(&self) -> bool { false }
#[inline(always)] fn is_variadic(&self) -> bool { false }
}
#[allow(unused)]
#[inline(always)] pub fn dynamic_result_fn(x: usize) -> RhaiResult {
@ -358,7 +356,6 @@ mod generate_tests {
}
#[inline(always)] fn is_method_call(&self) -> bool { false }
#[inline(always)] fn is_variadic(&self) -> bool { false }
}
#[allow(unused)]
#[inline(always)] pub fn dynamic_result_fn(context: NativeCallContext, x: usize) -> RhaiResult {
@ -396,7 +393,6 @@ mod generate_tests {
}
#[inline(always)] fn is_method_call(&self) -> bool { false }
#[inline(always)] fn is_variadic(&self) -> bool { false }
}
#[allow(unused)]
#[inline(always)] pub fn dynamic_result_fn() -> RhaiResult {
@ -428,7 +424,6 @@ mod generate_tests {
}
#[inline(always)] fn is_method_call(&self) -> bool { false }
#[inline(always)] fn is_variadic(&self) -> bool { false }
}
};
@ -460,7 +455,6 @@ mod generate_tests {
}
#[inline(always)] fn is_method_call(&self) -> bool { false }
#[inline(always)] fn is_variadic(&self) -> bool { false }
}
#[allow(unused)]
#[inline(always)] pub fn dynamic_result_fn(x: usize, y: usize) -> RhaiResult {
@ -500,7 +494,6 @@ mod generate_tests {
}
#[inline(always)] fn is_method_call(&self) -> bool { true }
#[inline(always)] fn is_variadic(&self) -> bool { false }
}
#[allow(unused)]
#[inline(always)] pub fn dynamic_result_fn(x: &mut usize, y: usize) -> RhaiResult {
@ -537,7 +530,6 @@ mod generate_tests {
}
#[inline(always)] fn is_method_call(&self) -> bool { false }
#[inline(always)] fn is_variadic(&self) -> bool { false }
}
#[allow(unused)]
#[inline(always)] pub fn dynamic_result_fn(message: &str) -> RhaiResult {

View File

@ -315,7 +315,6 @@ mod generate_tests {
}
#[inline(always)] fn is_method_call(&self) -> bool { false }
#[inline(always)] fn is_variadic(&self) -> bool { false }
}
}
};
@ -370,7 +369,6 @@ mod generate_tests {
}
#[inline(always)] fn is_method_call(&self) -> bool { false }
#[inline(always)] fn is_variadic(&self) -> bool { false }
}
}
};
@ -424,7 +422,6 @@ mod generate_tests {
}
#[inline(always)] fn is_method_call(&self) -> bool { false }
#[inline(always)] fn is_variadic(&self) -> bool { false }
}
}
};
@ -492,7 +489,6 @@ mod generate_tests {
}
#[inline(always)] fn is_method_call(&self) -> bool { false }
#[inline(always)] fn is_variadic(&self) -> bool { false }
}
#[allow(non_camel_case_types)]
@ -510,7 +506,6 @@ mod generate_tests {
}
#[inline(always)] fn is_method_call(&self) -> bool { false }
#[inline(always)] fn is_variadic(&self) -> bool { false }
}
}
};
@ -565,7 +560,6 @@ mod generate_tests {
}
#[inline(always)] fn is_method_call(&self) -> bool { false }
#[inline(always)] fn is_variadic(&self) -> bool { false }
}
}
};
@ -627,7 +621,6 @@ mod generate_tests {
}
#[inline(always)] fn is_method_call(&self) -> bool { false }
#[inline(always)] fn is_variadic(&self) -> bool { false }
}
}
};
@ -862,7 +855,6 @@ mod generate_tests {
}
#[inline(always)] fn is_method_call(&self) -> bool { false }
#[inline(always)] fn is_variadic(&self) -> bool { false }
}
}
};
@ -947,7 +939,6 @@ mod generate_tests {
}
#[inline(always)] fn is_method_call(&self) -> bool { false }
#[inline(always)] fn is_variadic(&self) -> bool { false }
}
}
};
@ -1001,7 +992,6 @@ mod generate_tests {
}
#[inline(always)] fn is_method_call(&self) -> bool { false }
#[inline(always)] fn is_variadic(&self) -> bool { false }
}
}
};
@ -1057,7 +1047,6 @@ mod generate_tests {
}
#[inline(always)] fn is_method_call(&self) -> bool { true }
#[inline(always)] fn is_variadic(&self) -> bool { false }
}
}
};
@ -1114,7 +1103,6 @@ mod generate_tests {
}
#[inline(always)] fn is_method_call(&self) -> bool { true }
#[inline(always)] fn is_variadic(&self) -> bool { false }
}
}
};
@ -1174,7 +1162,6 @@ mod generate_tests {
}
#[inline(always)] fn is_method_call(&self) -> bool { true }
#[inline(always)] fn is_variadic(&self) -> bool { false }
}
}
#[allow(unused_imports)]
@ -1255,7 +1242,6 @@ mod generate_tests {
}
#[inline(always)] fn is_method_call(&self) -> bool { true }
#[inline(always)] fn is_variadic(&self) -> bool { false }
}
}
#[allow(unused_imports)]
@ -1337,7 +1323,6 @@ mod generate_tests {
}
#[inline(always)] fn is_method_call(&self) -> bool { true }
#[inline(always)] fn is_variadic(&self) -> bool { false }
}
}
};
@ -1398,7 +1383,6 @@ mod generate_tests {
}
#[inline(always)] fn is_method_call(&self) -> bool { true }
#[inline(always)] fn is_variadic(&self) -> bool { false }
}
}
};
@ -1457,7 +1441,6 @@ mod generate_tests {
}
#[inline(always)] fn is_method_call(&self) -> bool { true }
#[inline(always)] fn is_variadic(&self) -> bool { false }
}
}
};
@ -1519,7 +1502,6 @@ mod generate_tests {
}
#[inline(always)] fn is_method_call(&self) -> bool { true }
#[inline(always)] fn is_variadic(&self) -> bool { false }
}
}
};
@ -1578,7 +1560,6 @@ mod generate_tests {
}
#[inline(always)] fn is_method_call(&self) -> bool { true }
#[inline(always)] fn is_variadic(&self) -> bool { false }
}
}
};
@ -1640,7 +1621,6 @@ mod generate_tests {
}
#[inline(always)] fn is_method_call(&self) -> bool { true }
#[inline(always)] fn is_variadic(&self) -> bool { false }
}
}
};
@ -1700,7 +1680,6 @@ mod generate_tests {
}
#[inline(always)] fn is_method_call(&self) -> bool { true }
#[inline(always)] fn is_variadic(&self) -> bool { false }
}
}
};
@ -1763,7 +1742,6 @@ mod generate_tests {
}
#[inline(always)] fn is_method_call(&self) -> bool { true }
#[inline(always)] fn is_variadic(&self) -> bool { false }
}
}
};

View File

@ -25,7 +25,4 @@ pub trait PluginFunction {
/// Is this plugin function a method?
fn is_method_call(&self) -> bool;
/// Is this plugin function variadic?
fn is_variadic(&self) -> bool;
}