Logo
Explore Help
Register Sign In
rust-lang/rust
1
0
Fork 0
You've already forked rust
Code Issues Pull Requests Actions 2 Packages Projects Releases Wiki Activity
Files
master
rust/tests/rustdoc-ui/remap-path-prefix-macro.rs

10 lines
356 B
Rust
Raw Permalink Normal View History

Fix ICE: attempted to remap an already remapped filename This commit fixes an internal compiler error (ICE) that occurs when rustdoc attempts to process macros with a remapped filename. The issue arose during macro expansion when the `--remap-path-prefix` option was used. Instead of passing remapped filenames through, which would trigger the "attempted to remap an already remapped filename" panic, we now extract the original local path from remapped filenames before processing them. A test case has been added to verify this behavior. Fixes #138520 Signed-off-by: Charalampos Mitrodimas <charmitro@posteo.net>
2025-03-16 11:28:21 +01:00
// Regression test for "attempted to remap an already remapped filename" ICE in rustdoc
// when using --remap-path-prefix with macro rendering.
// <https://github.com/rust-lang/rust/issues/138520>
//@ compile-flags:-Z unstable-options --remap-path-prefix={{src-base}}=remapped_path
//@ rustc-env:RUST_BACKTRACE=0
//@ build-pass
macro_rules! f(() => {});
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 161ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API