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