diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:11:38 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:13:23 +0000 |
commit | 20431706a863f92cb37dc512fef6e48d192aaf2c (patch) | |
tree | 2867f13f5fd5437ba628c67d7f87309ccadcd286 /compiler/rustc_save_analysis/src/sig.rs | |
parent | Releasing progress-linux version 1.65.0+dfsg1-2~progress7.99u1. (diff) | |
download | rustc-20431706a863f92cb37dc512fef6e48d192aaf2c.tar.xz rustc-20431706a863f92cb37dc512fef6e48d192aaf2c.zip |
Merging upstream version 1.66.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'compiler/rustc_save_analysis/src/sig.rs')
-rw-r--r-- | compiler/rustc_save_analysis/src/sig.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_save_analysis/src/sig.rs b/compiler/rustc_save_analysis/src/sig.rs index bae1828cd..83c51d213 100644 --- a/compiler/rustc_save_analysis/src/sig.rs +++ b/compiler/rustc_save_analysis/src/sig.rs @@ -337,7 +337,7 @@ impl<'hir> Sig for hir::Item<'hir> { } let name = self.ident.to_string(); let defs = vec![SigElement { - id: id_from_def_id(self.def_id.to_def_id()), + id: id_from_def_id(self.owner_id.to_def_id()), start: offset + text.len(), end: offset + text.len() + name.len(), }]; @@ -359,7 +359,7 @@ impl<'hir> Sig for hir::Item<'hir> { let mut text = "const ".to_owned(); let name = self.ident.to_string(); let defs = vec![SigElement { - id: id_from_def_id(self.def_id.to_def_id()), + id: id_from_def_id(self.owner_id.to_def_id()), start: offset + text.len(), end: offset + text.len() + name.len(), }]; @@ -428,7 +428,7 @@ impl<'hir> Sig for hir::Item<'hir> { let mut text = "mod ".to_owned(); let name = self.ident.to_string(); let defs = vec![SigElement { - id: id_from_def_id(self.def_id.to_def_id()), + id: id_from_def_id(self.owner_id.to_def_id()), start: offset + text.len(), end: offset + text.len() + name.len(), }]; @@ -579,7 +579,7 @@ impl<'hir> Sig for hir::Path<'hir> { let res = scx.get_path_res(id.ok_or("Missing id for Path")?); let (name, start, end) = match res { - Res::PrimTy(..) | Res::SelfTy { .. } | Res::Err => { + Res::PrimTy(..) | Res::SelfTyParam { .. } | Res::SelfTyAlias { .. } | Res::Err => { return Ok(Signature { text: path_to_string(self), defs: vec![], refs: vec![] }); } Res::Def(DefKind::AssocConst | DefKind::Variant | DefKind::Ctor(..), _) => { @@ -764,7 +764,7 @@ impl<'hir> Sig for hir::ForeignItem<'hir> { } let name = self.ident.to_string(); let defs = vec![SigElement { - id: id_from_def_id(self.def_id.to_def_id()), + id: id_from_def_id(self.owner_id.to_def_id()), start: offset + text.len(), end: offset + text.len() + name.len(), }]; @@ -780,7 +780,7 @@ impl<'hir> Sig for hir::ForeignItem<'hir> { let mut text = "type ".to_owned(); let name = self.ident.to_string(); let defs = vec![SigElement { - id: id_from_def_id(self.def_id.to_def_id()), + id: id_from_def_id(self.owner_id.to_def_id()), start: offset + text.len(), end: offset + text.len() + name.len(), }]; |