RS.CLIPPY.ENUM_GLOB_USE

Use items that import all variants of an enum

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

What it does

Checks for use Enum::*.

Why is this bad?

It is usually better style to use the prefixed name of an enumeration variant, rather than importing variants.

Known problems

Old-style enumerations that prefix the variants are still around.

Example

use std::cmp::Ordering::*;

foo(Less);

Use instead:

use std::cmp::Ordering;

foo(Ordering::Less)