interoptopus_proc_impl 0.16.0

Macros to produce Interoptopus item info.
Documentation
/// Identifiers known to cause issues in some backend language that shouldn't be used in Rust either.
#[allow(dead_code)]
pub const FORBIDDEN_NAMES: [&str; 136] = [
    "abstract",
    "add",
    "alias",
    "allows",
    "and",
    "args",
    "as",
    "ascending",
    "assert",
    "async",
    "await",
    "base",
    "bool",
    "break",
    "by",
    "byte",
    "case",
    "catch",
    "char",
    "checked",
    "class",
    "const",
    "continue",
    "decimal",
    "def",
    "default",
    "del",
    "delegate",
    "descending",
    "do",
    "double",
    "dynamic",
    "elif",
    "else",
    "enum",
    "equals",
    "event",
    "except",
    "explicit",
    "extension",
    "extern",
    "false",
    "False",
    "field",
    "finally",
    "fixed",
    "float",
    "for",
    "foreach",
    "from",
    "global",
    "goto",
    "group",
    "if",
    "implicit",
    "import",
    "in",
    "init",
    "int",
    "interface",
    "internal",
    "into",
    "is",
    "join",
    "lambda",
    "let",
    "lock",
    "long",
    "managed",
    "nameof",
    "namespace",
    "new",
    "nint",
    "nonlocal",
    "not",
    "notnull",
    "nuint",
    "null",
    "object",
    "on",
    "operator",
    "or",
    "orderby",
    "out",
    "override",
    "params",
    "partial",
    "pass",
    "private",
    "protected",
    "public",
    "raise",
    "readonly",
    "record",
    "ref",
    "remove",
    "required",
    "return",
    "sbyte",
    "scoped",
    "sealed",
    "select",
    "set",
    "short",
    "signed",
    "sizeof",
    "stackalloc",
    "static",
    "string",
    "struct",
    "switch",
    "this",
    "throw",
    "true",
    "True",
    "try",
    "typedef",
    "typeof",
    "uint",
    "ulong",
    "unchecked",
    "unmanaged",
    "unsafe",
    "unsigned",
    "ushort",
    "using",
    "value",
    "var",
    "virtual",
    "void",
    "volatile",
    "when",
    "where",
    "while",
    "with",
    "yield",
];

pub fn is_forbidden_name(name: impl AsRef<str>) -> bool {
    FORBIDDEN_NAMES.contains(&name.as_ref())
}