From 2161a1689d53be4c4c5ab9353735975e9949fb02 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 1 Sep 2018 12:30:53 +0300 Subject: Type aliases to scope --- crates/libeditor/src/scope/mod_scope.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'crates/libeditor/src/scope') diff --git a/crates/libeditor/src/scope/mod_scope.rs b/crates/libeditor/src/scope/mod_scope.rs index 25faee3b8..052f70569 100644 --- a/crates/libeditor/src/scope/mod_scope.rs +++ b/crates/libeditor/src/scope/mod_scope.rs @@ -26,6 +26,7 @@ impl ModuleScope { ast::ModuleItem::ConstDef(item) => Entry::new(item), ast::ModuleItem::StaticDef(item) => Entry::new(item), ast::ModuleItem::TraitDef(item) => Entry::new(item), + ast::ModuleItem::TypeDef(item) => Entry::new(item), ast::ModuleItem::Module(item) => Entry::new(item), ast::ModuleItem::UseItem(item) => { if let Some(tree) = item.use_tree() { @@ -104,6 +105,7 @@ mod tests { y::z, t, }; - ", &["Foo", "Bar", "baz", "quux", "z", "t"]) + type T = (); + ", &["Foo", "Bar", "baz", "quux", "z", "t", "T"]) } } -- cgit v1.2.3