diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2025-04-11 14:35:00 +0200 |
|---|---|---|
| committer | Mara Bos <m-ou.se@m-ou.se> | 2025-04-11 15:07:08 +0200 |
| commit | 3962069982783ccf183e273a983b0c150c51d504 (patch) | |
| tree | 05d7854f9d02b3c778e3e8e71c07e5b99f5c7d2c /compiler/rustc_fluent_macro/src | |
| parent | 6788ce76c9f66b836a3b6a72d8b6df32627edecc (diff) | |
| download | rust-3962069982783ccf183e273a983b0c150c51d504.tar.gz rust-3962069982783ccf183e273a983b0c150c51d504.zip | |
Replace proc_macro::SourceFile by Span::{file, local_file}.
Diffstat (limited to 'compiler/rustc_fluent_macro/src')
| -rw-r--r-- | compiler/rustc_fluent_macro/src/fluent.rs | 3 |
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` |
