Skip to main content

check_method

Function check_method 

Source
pub fn check_method(name: &str) -> Result<WhitelistedMethod, Diagnostic>
Expand description

判定方法调用,不在白名单时直接给出 Code::ChainHasCall 诊断。

codegen 侧通常只需要 if let Ok(m) = check_method(name) { ... } else { 报错 }。