about summary refs log tree commit diff
path: root/compiler/rustc_fluent_macro/src/fluent.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_fluent_macro/src/fluent.rs')
-rw-r--r--compiler/rustc_fluent_macro/src/fluent.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_fluent_macro/src/fluent.rs b/compiler/rustc_fluent_macro/src/fluent.rs
index b04fd1b48f7..c96bb48a036 100644
--- a/compiler/rustc_fluent_macro/src/fluent.rs
+++ b/compiler/rustc_fluent_macro/src/fluent.rs
@@ -25,7 +25,10 @@ fn invocation_relative_path_to_absolute(span: Span, path: &str) -> PathBuf {
         path.to_path_buf()
     } else {
         // `/a/b/c/foo/bar.rs` contains the current macro invocation
+        #[cfg(bootstrap)]
         let mut source_file_path = span.source_file().path();
+        #[cfg(not(bootstrap))]
+        let mut source_file_path = span.local_file().unwrap();
         // `/a/b/c/foo/`
         source_file_path.pop();
         // `/a/b/c/foo/../locales/en-US/example.ftl`