use alloc::borrow::ToOwned;
use alloc::boxed::Box;
use alloc::format;
use alloc::string::{String, ToString};
use alloc::vec;
use alloc::vec::Vec;
use alloc::borrow::Borrow;
use crate::rustc_data_structures::profiling::EventArgRecorder;
use crate::rustc_span::RemapPathScopeComponents;
use crate::rustc_span::source_map::SourceMap;
pub trait SpannedEventArgRecorder {
fn record_arg_with_span<A>(&mut self, source_map: &SourceMap, event_arg: A, span: crate::rustc_span::Span)
where
A: Borrow<str> + Into<String>;
}
impl SpannedEventArgRecorder for EventArgRecorder<'_> {
fn record_arg_with_span<A>(&mut self, source_map: &SourceMap, event_arg: A, span: crate::rustc_span::Span)
where
A: Borrow<str> + Into<String>,
{
self.record_arg(event_arg);
self.record_arg(source_map.span_to_string(span, RemapPathScopeComponents::DEBUGINFO));
}
}