We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent afd892a commit c6c1f32Copy full SHA for c6c1f32
clippy_lints/src/macro_use.rs
@@ -47,11 +47,8 @@ pub struct MacroRefData {
47
48
impl MacroRefData {
49
pub fn new(name: String, callee: Span, cx: &LateContext<'_>) -> Self {
50
- let mut path = cx
51
- .sess()
52
- .source_map()
53
- .span_to_filename(callee)
54
- .prefer_local()
+ let sm = cx.sess().source_map();
+ let mut path = sm.filename_for_diagnostics(&sm.span_to_filename(callee))
55
.to_string();
56
57
// std lib paths are <::std::module::file type>
0 commit comments