about summary refs log tree commit diff
path: root/compiler/rustc_expand/src/base.rs
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2025-06-18 17:57:22 +0000
committerMichael Goulet <michael@errs.io>2025-06-25 15:42:11 +0000
commit8cd3fa04e2e023967cf2cfe3e4170b636fd25019 (patch)
tree42fc183b7cee5f294bde109c934bf417619062f0 /compiler/rustc_expand/src/base.rs
parent2801f9aaf9b7580d9b230b532b0700709857cc88 (diff)
downloadrust-8cd3fa04e2e023967cf2cfe3e4170b636fd25019.tar.gz
rust-8cd3fa04e2e023967cf2cfe3e4170b636fd25019.zip
Don't give APITs names with macro expansion placeholder fragments in it
Diffstat (limited to 'compiler/rustc_expand/src/base.rs')
-rw-r--r--compiler/rustc_expand/src/base.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_expand/src/base.rs b/compiler/rustc_expand/src/base.rs
index 7a29f8c9fbd..fe76d9e0b64 100644
--- a/compiler/rustc_expand/src/base.rs
+++ b/compiler/rustc_expand/src/base.rs
@@ -1118,6 +1118,10 @@ pub trait ResolverExpand {
         trait_def_id: DefId,
         impl_def_id: LocalDefId,
     ) -> Result<Vec<(Ident, Option<Ident>)>, Indeterminate>;
+
+    /// Record the name of an opaque `Ty::ImplTrait` pre-expansion so that it can be used
+    /// to generate an item name later that does not reference placeholder macros.
+    fn insert_impl_trait_name(&mut self, id: NodeId, name: Symbol);
 }
 
 pub trait LintStoreExpand {