From c2015e7d182f3cb2cebe686127dd6a3e683df9e6 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 14 Jun 2021 22:42:43 +0300 Subject: internal: more natural order of sources for TypeParam We usually use first (left) variant of `Either` for "usual" case, and use right for odd things. For example, pat source is Pat | SelfParam. --- crates/hir/src/has_source.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/hir') diff --git a/crates/hir/src/has_source.rs b/crates/hir/src/has_source.rs index dc10a4d0f..197149c5e 100644 --- a/crates/hir/src/has_source.rs +++ b/crates/hir/src/has_source.rs @@ -127,7 +127,7 @@ impl HasSource for Impl { } impl HasSource for TypeParam { - type Ast = Either; + type Ast = Either; fn source(self, db: &dyn HirDatabase) -> Option> { let child_source = self.id.parent.child_source(db.upcast()); Some(child_source.map(|it| it[self.id.local_id].clone())) -- cgit v1.2.3