aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/attr.rs
diff options
context:
space:
mode:
authorice1000 <[email protected]>2019-12-03 16:07:56 +0000
committerice1000 <[email protected]>2019-12-03 16:07:56 +0000
commit009437f5d9949d2276aa26040e03af0ab328acf3 (patch)
tree74a889d70e201d6997c6baf179261ab3ed8bf23c /crates/ra_hir_def/src/attr.rs
parent15f143f0c33cbd382a2ad7a407d9601cb843d164 (diff)
Replace `ra_hir_expand::either` with crate
Diffstat (limited to 'crates/ra_hir_def/src/attr.rs')
-rw-r--r--crates/ra_hir_def/src/attr.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/crates/ra_hir_def/src/attr.rs b/crates/ra_hir_def/src/attr.rs
index bc7ade921..7f9a6e7ca 100644
--- a/crates/ra_hir_def/src/attr.rs
+++ b/crates/ra_hir_def/src/attr.rs
@@ -2,7 +2,8 @@
2 2
3use std::{ops, sync::Arc}; 3use std::{ops, sync::Arc};
4 4
5use hir_expand::{either::Either, hygiene::Hygiene, AstId, InFile}; 5use either::Either;
6use hir_expand::{hygiene::Hygiene, AstId, InFile};
6use mbe::ast_to_token_tree; 7use mbe::ast_to_token_tree;
7use ra_syntax::{ 8use ra_syntax::{
8 ast::{self, AstNode, AttrsOwner}, 9 ast::{self, AstNode, AttrsOwner},
@@ -45,8 +46,8 @@ impl Attrs {
45 AttrDefId::StructFieldId(it) => { 46 AttrDefId::StructFieldId(it) => {
46 let src = it.parent.child_source(db); 47 let src = it.parent.child_source(db);
47 match &src.value[it.local_id] { 48 match &src.value[it.local_id] {
48 Either::A(_tuple) => Attrs::default(), 49 Either::Left(_tuple) => Attrs::default(),
49 Either::B(record) => Attrs::from_attrs_owner(db, src.with_value(record)), 50 Either::Right(record) => Attrs::from_attrs_owner(db, src.with_value(record)),
50 } 51 }
51 } 52 }
52 AttrDefId::EnumVariantId(var_id) => { 53 AttrDefId::EnumVariantId(var_id) => {