&&&&&&&&&&&&&&str
&&&&&&&&&&&&&&strJanuary 9, 2026rustperformanceWhile adding a failing test to the Rust compiler, I stumbled upon a peculiar code generation test:pub fn thirteen_ref(input: &&&&&&&&&&&&&str) -> String { // CHECK-NOT: {{(call|invoke)}}{{.*}}@{{.*}}core{{.*}}fmt{{.*}} input.to_string() } // This is a known performance cliff because of the macro-generated // specialized impl. If this test suddenly starts failing, // consider removing the `to_string_str!` macro in `alloc/str/string.rs`. // pub fn fourteen_ref(input: &&&&&&&&&&&&&&str) -> String { // CHECK: {{(call|invoke)}}{{.*}}@{{.*}}core{{.*}}fmt{{.*}} …