aboutsummaryrefslogtreecommitdiff
path: root/crates/hir
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-06-14 20:44:59 +0100
committerGitHub <[email protected]>2021-06-14 20:44:59 +0100
commit447d849c9ecb3d0f7783a56db429ccc526d0d8dc (patch)
treeb6325f21f742f55d225caebad4d5ac057f683855 /crates/hir
parentce8fdf3ab05b59b517dee985e4b3828c6e373a91 (diff)
parentc2015e7d182f3cb2cebe686127dd6a3e683df9e6 (diff)
Merge #9277
9277: internal: more natural order of sources for TypeParam r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/hir')
-rw-r--r--crates/hir/src/has_source.rs2
1 files changed, 1 insertions, 1 deletions
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 {
127} 127}
128 128
129impl HasSource for TypeParam { 129impl HasSource for TypeParam {
130 type Ast = Either<ast::Trait, ast::TypeParam>; 130 type Ast = Either<ast::TypeParam, ast::Trait>;
131 fn source(self, db: &dyn HirDatabase) -> Option<InFile<Self::Ast>> { 131 fn source(self, db: &dyn HirDatabase) -> Option<InFile<Self::Ast>> {
132 let child_source = self.id.parent.child_source(db.upcast()); 132 let child_source = self.id.parent.child_source(db.upcast());
133 Some(child_source.map(|it| it[self.id.local_id].clone())) 133 Some(child_source.map(|it| it[self.id.local_id].clone()))