mod list { pub use self::List::Cons; pub enum List { Cons(T, Box>), } } mod alias { use crate::list::List; pub type Foo = List; } fn foo(l: crate::alias::Foo) { match l { Cons(..) => {} //~ ERROR: cannot find tuple struct or tuple variant `Cons` in this scope } } fn main() {}