RS.CLIPPY.DISALLOWED_SCRIPT_IDENTS

Usage of non-allowed Unicode scripts

This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: disallowed_script_idents. Copyright ©2025 The Rust Team. All rights reserved.

What it does

Checks for usage of unicode scripts other than those explicitly allowed by the lint config.

This lint doesn't take into account non-text scripts such as Unknown and Linear_A. It also ignores the Common script type. While configuring, be sure to use official script name aliases from the list of supported scripts.

See also: non_ascii_idents.

Why restrict this?

It may be not desired to have many different scripts for identifiers in the codebase.

Note that if you only want to allow typical English, you might want to use built-in non_ascii_idents lint instead.

Example

// Assuming that `clippy.toml` contains the following line:
// allowed-scripts = ["Latin", "Cyrillic"]
let counter = 10; // OK, latin is allowed.
let счётчик = 10; // OK, cyrillic is allowed.
let zähler = 10; // OK, it\'s still latin.
let カウンタ = 10; // Will spawn the lint.

Configuration

  • allowed-scripts: The list of unicode scripts allowed to be used in the scope.

    (default: ["Latin"])