Uniform Paths

Minimum Rust version: 1.32

Rust 2018 added several improvements to the module system. We have one last tweak landing in 1.32.0. Nicknamed "uniform paths", it permits previously invalid import path statements to be resolved exactly the same way as non-import paths. For example:


#![allow(unused_variables)]
fn main() {
enum Color {
    Red,
    Green,
    Blue,
}

use Color::*;
}

This code did not previously compile, as use statements had to start with super, self, or crate. Now that the compiler supports uniform paths, this code will work, and do what you probably expect: import the variants of the Color enum defined above the use statement.