diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-11-28 10:02:46 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-11-28 10:02:46 +0000 |
commit | 16030528b53d38e24c1e5733aa4cc46058d0bbd1 (patch) | |
tree | e878f88aebf11c0e54eff2e107dfaa4d192ab272 /crates/ra_hir_def/src/attr.rs | |
parent | 2702fa1c5d6d8ad504c0d7703b6363ea09ba5570 (diff) | |
parent | ccd1b0800a5de5e046e6e9a4b6f49030c1ce3639 (diff) |
Merge #2440
2440: Rename Source -> InFile r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir_def/src/attr.rs')
-rw-r--r-- | crates/ra_hir_def/src/attr.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_hir_def/src/attr.rs b/crates/ra_hir_def/src/attr.rs index fffb22201..83783ac7a 100644 --- a/crates/ra_hir_def/src/attr.rs +++ b/crates/ra_hir_def/src/attr.rs | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | use std::{ops, sync::Arc}; | 3 | use std::{ops, sync::Arc}; |
4 | 4 | ||
5 | use hir_expand::{either::Either, hygiene::Hygiene, AstId, Source}; | 5 | use hir_expand::{either::Either, hygiene::Hygiene, AstId, InFile}; |
6 | use mbe::ast_to_token_tree; | 6 | use mbe::ast_to_token_tree; |
7 | use ra_syntax::{ | 7 | use ra_syntax::{ |
8 | ast::{self, AstNode, AttrsOwner}, | 8 | ast::{self, AstNode, AttrsOwner}, |
@@ -68,7 +68,7 @@ impl Attrs { | |||
68 | } | 68 | } |
69 | } | 69 | } |
70 | 70 | ||
71 | fn from_attrs_owner(db: &impl DefDatabase, owner: Source<&dyn AttrsOwner>) -> Attrs { | 71 | fn from_attrs_owner(db: &impl DefDatabase, owner: InFile<&dyn AttrsOwner>) -> Attrs { |
72 | let hygiene = Hygiene::new(db, owner.file_id); | 72 | let hygiene = Hygiene::new(db, owner.file_id); |
73 | Attrs::new(owner.value, &hygiene) | 73 | Attrs::new(owner.value, &hygiene) |
74 | } | 74 | } |
@@ -157,7 +157,7 @@ where | |||
157 | N: ast::AttrsOwner, | 157 | N: ast::AttrsOwner, |
158 | D: DefDatabase, | 158 | D: DefDatabase, |
159 | { | 159 | { |
160 | let src = Source::new(src.file_id(), src.to_node(db)); | 160 | let src = InFile::new(src.file_id(), src.to_node(db)); |
161 | Attrs::from_attrs_owner(db, src.as_ref().map(|it| it as &dyn AttrsOwner)) | 161 | Attrs::from_attrs_owner(db, src.as_ref().map(|it| it as &dyn AttrsOwner)) |
162 | } | 162 | } |
163 | 163 | ||