Skip to content

Commit f7efc12

Browse files
committed
fix: swap Span::source_file -> Span::file
rust-lang/rust#54725 rust-lang/rust#139903
1 parent 498c2a7 commit f7efc12

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

macro/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ impl Paths {
376376
fn get_call_site_rel() -> PathBuf {
377377
// Sometimes `proc_macro::Span::call_site()` returns a relative path, sometimes an absolute
378378
// one. In the latter case, we need to discover the relative part from the project root.
379-
let mut call_site_path = proc_macro::Span::call_site().source_file().path();
379+
let mut call_site_path: std::path::PathBuf = proc_macro::Span::call_site().file().into();
380380
call_site_path.set_extension("");
381381
if call_site_path.is_relative() {
382382
return call_site_path.to_path_buf();

0 commit comments

Comments
 (0)