aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/adt.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-12-03 16:13:42 +0000
committerGitHub <[email protected]>2019-12-03 16:13:42 +0000
commit96b9d5b44ed50160c7a4eb07a31bee5f05b1ecf3 (patch)
tree74a889d70e201d6997c6baf179261ab3ed8bf23c /crates/ra_hir_def/src/adt.rs
parent15f143f0c33cbd382a2ad7a407d9601cb843d164 (diff)
parent009437f5d9949d2276aa26040e03af0ab328acf3 (diff)
Merge #2469
2469: Replace `ra_hir_expand::either` with crate r=matklad a=ice1000 As title. Co-authored-by: ice1000 <[email protected]>
Diffstat (limited to 'crates/ra_hir_def/src/adt.rs')
-rw-r--r--crates/ra_hir_def/src/adt.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_hir_def/src/adt.rs b/crates/ra_hir_def/src/adt.rs
index 9ab829aab..db3e63ef8 100644
--- a/crates/ra_hir_def/src/adt.rs
+++ b/crates/ra_hir_def/src/adt.rs
@@ -2,8 +2,8 @@
2 2
3use std::sync::Arc; 3use std::sync::Arc;
4 4
5use either::Either;
5use hir_expand::{ 6use hir_expand::{
6 either::Either,
7 name::{AsName, Name}, 7 name::{AsName, Name},
8 InFile, 8 InFile,
9}; 9};
@@ -184,7 +184,7 @@ fn lower_struct(
184 ast::StructKind::Tuple(fl) => { 184 ast::StructKind::Tuple(fl) => {
185 for (i, fd) in fl.fields().enumerate() { 185 for (i, fd) in fl.fields().enumerate() {
186 trace.alloc( 186 trace.alloc(
187 || Either::A(fd.clone()), 187 || Either::Left(fd.clone()),
188 || StructFieldData { 188 || StructFieldData {
189 name: Name::new_tuple_field(i), 189 name: Name::new_tuple_field(i),
190 type_ref: TypeRef::from_ast_opt(fd.type_ref()), 190 type_ref: TypeRef::from_ast_opt(fd.type_ref()),
@@ -196,7 +196,7 @@ fn lower_struct(
196 ast::StructKind::Record(fl) => { 196 ast::StructKind::Record(fl) => {
197 for fd in fl.fields() { 197 for fd in fl.fields() {
198 trace.alloc( 198 trace.alloc(
199 || Either::B(fd.clone()), 199 || Either::Right(fd.clone()),
200 || StructFieldData { 200 || StructFieldData {
201 name: fd.name().map(|n| n.as_name()).unwrap_or_else(Name::missing), 201 name: fd.name().map(|n| n.as_name()).unwrap_or_else(Name::missing),
202 type_ref: TypeRef::from_ast_opt(fd.ascribed_type()), 202 type_ref: TypeRef::from_ast_opt(fd.ascribed_type()),