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 989d1a7 commit 68ea8ffCopy full SHA for 68ea8ff
compiler/rustc_errors/src/emitter.rs
@@ -771,8 +771,12 @@ impl EmitterWriter {
771
self
772
}
773
774
- fn maybe_anonymized(&self, line_num: usize) -> String {
775
- if self.ui_testing { ANONYMIZED_LINE_NUM.to_string() } else { line_num.to_string() }
+ fn maybe_anonymized(&self, line_num: usize) -> Cow<'static, str> {
+ if self.ui_testing {
776
+ Cow::Borrowed(ANONYMIZED_LINE_NUM)
777
+ } else {
778
+ Cow::Owned(line_num.to_string())
779
+ }
780
781
782
fn draw_line(
0 commit comments