about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/ArchiveWrapper.cpp
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-06-26 15:47:20 +0200
committerGitHub <noreply@github.com>2025-06-26 15:47:20 +0200
commita05f2cc44db687e6be19d84119cf7f8c9e52c510 (patch)
tree93619423e6c9144e12e077c56db4a40cab9d720c /compiler/rustc_llvm/llvm-wrapper/ArchiveWrapper.cpp
parentd73bf103b9040a417ab5dacc3e93cb487b49f397 (diff)
parent8cd3fa04e2e023967cf2cfe3e4170b636fd25019 (diff)
downloadrust-a05f2cc44db687e6be19d84119cf7f8c9e52c510.tar.gz
rust-a05f2cc44db687e6be19d84119cf7f8c9e52c510.zip
Rollup merge of #142393 - compiler-errors:nofield, r=petrochenkov
Don't  give APITs names with macro expansion placeholder fragments in it

The `DefCollector` previously called `pprust::ty_to_string` to construct a name for APITs (arg-position impl traits). The `ast::Ty` that was being formatted however has already had its macro calls replaced with "placeholder fragments", which end up rendering like `!()` (or ICEing, in the case of rust-lang/rust#140333, since it led to a placeholder struct field with no name).

Instead, collect the name of the APIT *before* we visit its macros and replace them with placeholders in the macro expander. This makes the implementation a bit more involved, but AFAICT there's no better way to do this since we can't do a reverse mapping from placeholder fragment -> original macro call AST.

Fixes rust-lang/rust#140333
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/ArchiveWrapper.cpp')
0 files changed, 0 insertions, 0 deletions