Skip to content

Commit 5fe2970

Browse files
committed
Replace manual RealFileName deconstruction with into_local_path
1 parent 5b02abb commit 5fe2970

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/librustdoc/json/conversions.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,7 @@ impl JsonRenderer<'_> {
5959
let hi = span.hi(self.sess());
6060
let lo = span.lo(self.sess());
6161
Some(Span {
62-
filename: match name {
63-
rustc_span::RealFileName::Named(path) => path,
64-
rustc_span::RealFileName::Devirtualized { local_path, virtual_name: _ } => {
65-
local_path
66-
}
67-
},
62+
filename: name.into_local_path(),
6863
begin: (lo.line, lo.col.to_usize()),
6964
end: (hi.line, hi.col.to_usize()),
7065
})

0 commit comments

Comments
 (0)