mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
Turn ImplBlock into a copy type just containing IDs
This makes it more like the other code model types. Also make Module::definition_source/declaration_source return HirFileIds, to make them more like the other source functions.
This commit is contained in:
parent
6932b77093
commit
0242acae53
9 changed files with 65 additions and 77 deletions
|
@ -74,7 +74,10 @@ impl HirFileId {
|
|||
}
|
||||
}
|
||||
|
||||
pub(crate) fn as_original_file(self) -> FileId {
|
||||
/// XXX: this is a temporary function, which should go away when we implement the
|
||||
/// nameresolution+macro expansion combo. Prefer using `original_file` if
|
||||
/// possible.
|
||||
pub fn as_original_file(self) -> FileId {
|
||||
match self.0 {
|
||||
HirFileIdRepr::File(file_id) => file_id,
|
||||
HirFileIdRepr::Macro(_r) => panic!("macro generated file: {:?}", self),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue