Path remapping: Make behavior of diagnostics output dependent on presence of --remap-path-prefix.
This commit is contained in:
@@ -47,11 +47,8 @@ pub struct MacroRefData {
|
|||||||
|
|
||||||
impl MacroRefData {
|
impl MacroRefData {
|
||||||
pub fn new(name: String, callee: Span, cx: &LateContext<'_>) -> Self {
|
pub fn new(name: String, callee: Span, cx: &LateContext<'_>) -> Self {
|
||||||
let mut path = cx
|
let sm = cx.sess().source_map();
|
||||||
.sess()
|
let mut path = sm.filename_for_diagnostics(&sm.span_to_filename(callee))
|
||||||
.source_map()
|
|
||||||
.span_to_filename(callee)
|
|
||||||
.prefer_local()
|
|
||||||
.to_string();
|
.to_string();
|
||||||
|
|
||||||
// std lib paths are <::std::module::file type>
|
// std lib paths are <::std::module::file type>
|
||||||
|
|||||||
Reference in New Issue
Block a user