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.
memcpy
String::push
1 parent 90154a2 commit 89fa55eCopy full SHA for 89fa55e
tests/codegen/string-push.rs
@@ -0,0 +1,11 @@
1
+//@ compile-flags: -O
2
+#![crate_type = "lib"]
3
+
4
+use std::hint::black_box;
5
6
+// CHECK-LABEL: @string_push_does_not_call_memcpy
7
+#[no_mangle]
8
+pub fn string_push_does_not_call_memcpy(s: &mut String, ch: char) {
9
+ // CHECK-NOT: call void @llvm.memcpy
10
+ s.push(ch);
11
+}
0 commit comments