Turn const_caller_location from a query to a hook
This commit is contained in:
@@ -590,12 +590,12 @@ impl<'tcx> TyCtxt<'tcx> {
|
||||
pub fn span_as_caller_location(self, span: Span) -> ConstValue<'tcx> {
|
||||
let topmost = span.ctxt().outer_expn().expansion_cause().unwrap_or(span);
|
||||
let caller = self.sess.source_map().lookup_char_pos(topmost.lo());
|
||||
self.const_caller_location((
|
||||
self.const_caller_location(
|
||||
rustc_span::symbol::Symbol::intern(
|
||||
&caller.file.name.for_codegen(&self.sess).to_string_lossy(),
|
||||
),
|
||||
caller.line as u32,
|
||||
caller.col_display as u32 + 1,
|
||||
))
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user